How to convert this 05:41:33 Apr 23, 2012 PDT value to datetime in C#?
asp.net, c#
Solution
The `PDT` is not recognizable as a timezone by any of the parsing options for a `DateTime` in the BCL.
If you convert it to `-0700` before parse it will parse ok.
string correctedTZ = "05:41:33 Apr 23, 2012 PDT".Replace("PDT", "-0700");
DateTime dt = Convert.ToDateTime(correctedTZ);
Problem
Possible Duplicate: Parse DateTime with timezone of form PST/CEST/UTC/etc How to Convert PDT Time string to DateTime I want to convert this value 05:41:33 Apr 23, 2012 PDT to datetime . i am trying this but it is giving an error. ``` DateTime dt = Convert.ToDateTime("05:41:33 Apr 23, 2012 PDT"); ``` Please help me guys how we can do it in C#. Thanks,Rajbir