Last post Mar 28, 2008 02:36 AM by tmptplayer
Mar 28, 2008 01:59 AM|tmptplayer|LINK
I'm trying to display the current time (UTC) in the 24 hour format, however I've only been able to get the 12 hour format. Here is my code:
lbl1.Text = DateTime.UtcNow.ToString("F");
And here is my output:
Any ideas to convert 11:56:08 PM to the 24 hour clock? Thanks.
Mar 28, 2008 02:28 AM|pnv.ravikiran|LINK
I hope below code will work for you.
Please mark as “Answer” if you find this post helpful
Mar 28, 2008 02:31 AM|mbanavige|LINK
the format characters are case sensitive. for a 24 hour format, you can use uppercase HH. lowercase hh uses the 12 hour clock.
Mar 28, 2008 02:36 AM|tmptplayer|LINK
Awesome, thanks to you both. Have a good evening!