Ian,
You want to use this instead:
myDTFI.FullDateTimePattern = "yyyyMMdd HHmmss";
DateTime switchdate = DateTime.ParseExact(datething,"yyyyMMdd HHmmss",
myDTFI);
Note the capital H. This will interpret the hour as military time,
instead of am/pm.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Ian Frawley" <ye**@yeah.com> wrote in message
news:OW**************@TK2MSFTNGP12.phx.gbl...
anyone know how to get this working?
string ergggg = "20051201 162533";
DateTimeFormatInfo myDTFI = new CultureInfo( "en-Gb",
false ).DateTimeFormat;
myDTFI.FullDateTimePattern = "yyyyMMdd hhmmss";
DateTime switchdate = DateTime.ParseExact(datething,"yyyyMMdd hhmmss",
myDTFI);
string ace = switchdate.ToString();
--
Regards
Ian Frawley