开发者

how to change Time format?

开发者 https://www.devze.com 2023-03-06 19:49 出处:网络
How to fatch Hou开发者_运维知识库rs:minutesfrom a datetime variable. Right I am using Strings function to achieve this. Is there any builtin function for this?for showing time in hh:mm you can format

How to fatch Hou开发者_运维知识库rs:minutes from a datetime variable. Right I am using Strings function to achieve this. Is there any builtin function for this?


for showing time in hh:mm you can format like this

date.ToString("hh:mm");


yourdt.ToString("h:m");

for current time

DateTime.Now.ToString("h:m");
0

精彩评论

暂无评论...
验证码 换一张
取 消