By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,969 Members | 1,522 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,969 IT Pros & Developers. It's quick & easy.

Issues converting to DateTime format

P: n/a
Hi,

I'm having a hard time parsing the following date/time that I get in
an XML call to a third party service provider.

12 Jun 2007 08:00 EST5EDT

I like to assign it to DateTime and can't find anything on Google

Thank you
Maz

Jun 1 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Off the top of my head (so excuse syntax errors and format string
specifics, etc), can't you just use ParseExact:

string myDate = "12 Jun 2007 08:00 EST5EDT";
DateTime dt = DateTime.ParseExact(myDate, "{dd MMM yyyy hh:mm}");

Dunc
http://www.fluideating.co.uk

On 1 Jun, 17:02, mazdotnet <maflat...@gmail.comwrote:
Hi,

I'm having a hard time parsing the following date/time that I get in
an XML call to a third party service provider.

12 Jun 2007 08:00 EST5EDT

I like to assign it to DateTime and can't find anything on Google

Thank you
Maz

Jun 1 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.