Kiran,
Are you using CDate or DateTime.ParseExact. It sounds like you are using
CDate, when you should be using DateTime.ParseExact. Something like:
Dim input As String = "Thu Jul 21 00:00:00 UTC+0100 2005"
Const format As String = "ddd MMM dd hh:mm:ss \U\T\Czzzz yyyy"
Dim value As DateTime = DateTime.ParseExact(input, _
format, System.Globalization.CultureInfo.InvariantCulture)
For details on custom datetime formats see:
http://msdn.microsoft.com/library/de...matstrings.asp
For information on formatting in .NET in general see:
http://msdn.microsoft.com/library/de...ttingtypes.asp
Hope this helps
Jay
Hope this helps
Jay
"Kiran" <ki***@nospam.net> wrote in message
news:uI**************@TK2MSFTNGP09.phx.gbl...
| Hi,
|
| I am trying to convert a string(Thu Jul 21 00:00:00 UTC+0100 200) to
| date. I get the following error
|
| Cast from string "Thu Jul 21 00:00:00 UTC+0100 200" to type 'Date' is
| not valid(System.InvalidCastException)
|
| Any help on this will be appreciated
|
| Thanks
| Kiran