Vaj <vi*******@hotmail.com> wrote:
I need to convert the datetime "10/10/2003 20:30:20 AM" to 10/10/2003 .
Can anyone help me to solve this.
Well that's quite a strange time to start with - you've got a 24 hour
clock, but you're specifying "AM" as well. In other words, that time is
8pm in the morning!
When you've worked out what format you actually mean, use
DateTime.Parse or DateTime.ParseExact to parse it, then
DateTime.ToString with another format string to format it.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too