DateTime function

  • Thread starter Thread starter maflatoun
  • Start date Start date
M

maflatoun

Hi all,

I'm using XML-RPC to grab some information from a third party service
provider and they're returning the following date/time format.

12 Jun 2007 08:00 EST5EDT

How can I convert that to a DateTime without too much coding? I did
some googling and couldn't find anything.

Thanks
M.
 
M.,

You are going to have to drop the timezone information, as it doesn't
seem to conform to anything I have seen (or can find through google).

Once you do that, you can pass the string "12 Jun 2007 08:00" to the
static Parse method on the DateTime structure and it will parse it just
fine.

You would then have to do any work with the timezone yourself.
 
Nicholas said:
M.,

You are going to have to drop the timezone information, as it doesn't
seem to conform to anything I have seen (or can find through google).

It's an older format by .NET standards. See
http://msdn2.microsoft.com/en-us/library/90s5c885(VS.80).aspx for an
example of how that format might be used with the CRT _tzset function.

I believe it should be familiar to java developers as well. CF
http://developer.classpath.org/doc/java/util/TimeZone-source.html.

I can't find that there is any support anywhere in the framework for
that timezone format though.
Once you do that, you can pass the string "12 Jun 2007 08:00" to the
static Parse method on the DateTime structure and it will parse it just
fine.

You would then have to do any work with the timezone yourself.

Unfortunately, true.
 
Back
Top