Parsing Custom DateTimes

  • Thread starter Thread starter Alan Gilmour
  • Start date Start date
A

Alan Gilmour

Hi All,

Does anyone know how to parse a custom datetime string.

i.e. say I had a date time string in this format

string thedate = "Tue, 5 AUG 2003 13:29:00"
string theformat = "ddd, d mmm yyyy hh:mm:ss"

Could I then call DateTime.Parse(thedate,theformat), for example.

I had a look at the overloaded constructors on MSDN but never really found
anything helpful.


Thanks

Alan
 
You should be able to use DateTime.Parse, why don't you just give it a
try?....
 
I did, it didn't work. However I now have the solution.


You Can specify a format, with DateTime.ParseExact()


Thanks
for your help

Alan
 
Back
Top