Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DateTime fields
Message
From
20/08/2003 19:22:10
 
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00822047
Message ID:
00822052
Views:
13
This message has been marked as the solution to the initial question of the thread.
Hi, Michael.

>It cuts off the time and only gives me the date, even though strDateTime has the time. It seems like it may be due to the time in strDateTime is 12 hour time, with an AM or PM at the end.

I just tried something as simple as:
string strDateTime = "08/20/03 06:20:12 PM";
DateTime dt = DateTime.Parse(strDateTime);

Console.WriteLine(dt);
and it worked. Could you print the value of strDateTime so that we can see what's been passed to the Parse method?
Claudio Lassala
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform