all groups > asp.net > april 2005 >
You're in the

asp.net

group:

Urgent Help


Urgent Help Chris
4/26/2005 11:32:04 PM
asp.net:
Hi,
How do I convert the short date 4/25/2005 to 20050425?

Re: Urgent Help Steve C. Orr [MVP, MCSD]
4/26/2005 11:51:31 PM
Try something like this:
MyString = MyDate.ToString("yyyymmdd")

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


[quoted text, click to view]

Re: Urgent Help Chris
4/27/2005 1:32:02 AM
I tried that but it didn't work. I also tried

Dim sDate As String = "4/25/2005"

MsgBox(Convert.ToDateTime(sDate).ToShortDateString).ToString("yyyymmdd")

Didn't work either.

[quoted text, click to view]
AddThis Social Bookmark Button