Home All Groups Group Topic Archive Search About
Author
29 Mar 2006 10:01 PM
Bill Nguyen
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

Author
30 Mar 2006 4:51 AM
Stephany Young
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.


Show quoteHide quote
"Bill Nguyen" <billn_nospam_please@jaco.com> wrote in message
news:%23Z%23ZPx3UGHA.4436@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
>
Author
30 Mar 2006 11:38 PM
Bill Nguyen
Thanks Stephany.

Bill
Show quoteHide quote
"Stephany Young" <noone@localhost> wrote in message
news:OGQwgW7UGHA.2004@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" <billn_nospam_please@jaco.com> wrote in message
> news:%23Z%23ZPx3UGHA.4436@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
>>
>
>