Click to See Complete Forum and Search --> : [RESOLVED] DateTime.now returns wrong time + the time returned never changes!


bluebarca
March 20th, 2009, 01:34 AM
i've used DateTime.Now and to get the date as the MM/DD/YYYY HH:MM:SS; the date comes out right every time but i have a problem with the time, the time is always 12:00:00 no matter when i run the code. I've checked the time zone and its correct.

How can i solve this problem to get the correct current time ?

eclipsed4utoo
March 20th, 2009, 06:37 AM
try


DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss tt")


capitalization matters. "MM" is month, "mm" is minutes.