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

Date & Time format

P: n/a
I receive data in an XML file with the following date/time format. While I
can parse the date & time using string function, I would like to know if
this is some sort of datetime in SQLserver that I can use directly:

<DateTime>2006-03-29T13:12:00.000</DateTime>

Thanks

Bill
Mar 29 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Why would you be using a string function to parse a date & time that is in
this format?

The format is the conforms to the ISO 8601 standard and is handled via the
Standard DateTime Format string s.

Therefore:

Dim _d as DateTime

DateTime.ParseExact(node.InnerText, "s", Nothing,
DateTimeStyles.AssumeLocal)

Modify the last 2 parameters to the ParesExact method as required.
"Bill Nguyen" <bi*****************@jaco.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
I receive data in an XML file with the following date/time format. While I
can parse the date & time using string function, I would like to know if
this is some sort of datetime in SQLserver that I can use directly:

<DateTime>2006-03-29T13:12:00.000</DateTime>

Thanks

Bill

Mar 30 '06 #2

P: n/a
Thanks Stephany.

Bill
"Stephany Young" <noone@localhost> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...
Why would you be using a string function to parse a date & time that is in
this format?

The format is the conforms to the ISO 8601 standard and is handled via the
Standard DateTime Format string s.

Therefore:

Dim _d as DateTime

DateTime.ParseExact(node.InnerText, "s", Nothing,
DateTimeStyles.AssumeLocal)

Modify the last 2 parameters to the ParesExact method as required.
"Bill Nguyen" <bi*****************@jaco.com> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
I receive data in an XML file with the following date/time format. While I
can parse the date & time using string function, I would like to know if
this is some sort of datetime in SQLserver that I can use directly:

<DateTime>2006-03-29T13:12:00.000</DateTime>

Thanks

Bill


Mar 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.