I need to convert a string as: "DEC 18 2007 2:49:40:783PM"
to a date. This value is sent by SQL server as :select convert(varchar (30),
creationDate, 109) from ... ... .
I tried :
Dim dt As DateTime
Dim myCultureInfo As New CultureInfo("en-US")
If DateTime.TryPar seExact("Dec 18 2007 2:49:40:783PM", "mon dd yyyy
hh:mi:ss:mmmAM" , myCultureInfo, Globalization.D ateTimeStyles.N one, dt) Then
.... ...
.... .... ..
always return false (string not a valid date)
how can I do it ?
to a date. This value is sent by SQL server as :select convert(varchar (30),
creationDate, 109) from ... ... .
I tried :
Dim dt As DateTime
Dim myCultureInfo As New CultureInfo("en-US")
If DateTime.TryPar seExact("Dec 18 2007 2:49:40:783PM", "mon dd yyyy
hh:mi:ss:mmmAM" , myCultureInfo, Globalization.D ateTimeStyles.N one, dt) Then
.... ...
.... .... ..
always return false (string not a valid date)
how can I do it ?
Comment