Main Site Documentation

How to configurate Datetime ToString format to 24Hours


#1

hi all,
i have fez_panda
when i getting time from Datetime.now its returning 12 hours format so i want 24 format :slight_smile:


#2

Actually, it just returns a datetime value. What makes you think it’s in 12hour format? When you do a toString()?

A quick search shows http://www.tinyclr.com/forum/18/3355/


#3

so i have this time: 06/04/2011 13:14:36

but when I’m doing this ToString format that returns
UTCTime = mUTCDateTime.ToString(“yyyyMMddhhmmss”)

UTCTime = 20110604011436


#4

tnx Brett
i solved the problem
i change hh to HH and it worked :slight_smile: