DateTime function

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
T

Tom Porterfield

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top