W
Wayne Wengert
I am using VB.NET - VSNET 2003 and accessing data from an SQL Server. I am
trying to convert a datetime field retrieved from the DB to a format like
"MM/DD/YYYY" - I want results like "10/28/2004". I am trying the code:
CDate((rdr1.Item("Date"))).ToString("MM/DD/YYYY")
but when I look at the output it looks like this:
02/DD/YYYY
Here is a copy of the test I did while stepping through the code:
?CDate(rdr1.Item("Date")).ToString("MM/DD/YYYY")
"02/DD/YYYY"
What am I doing wrong?
Wayne
trying to convert a datetime field retrieved from the DB to a format like
"MM/DD/YYYY" - I want results like "10/28/2004". I am trying the code:
CDate((rdr1.Item("Date"))).ToString("MM/DD/YYYY")
but when I look at the output it looks like this:
02/DD/YYYY
Here is a copy of the test I did while stepping through the code:
?CDate(rdr1.Item("Date")).ToString("MM/DD/YYYY")
"02/DD/YYYY"
What am I doing wrong?
Wayne