Adjusting Timezone - Convert XML DateTime to SQL DateTime
- by noob.spt
We are using TypedDataSet in our application. Data is passed to procedure in form of XML for insert/update.
Now after populating DE with data, datetime remains the same though timezone information is added as below.
Date in DB: 2009-10-29 18:52:53.43
Date in XML: 2009-10-29T18:52:53.43-05:00
Now when I am trying to convert below XML to SQL DateTime it is adjusting 5 hours and I am getting
2009-10-29 23:52:53.430
as the final output, which is wrong. Need to find a way to extract datetime from below XML snippet ignoring timezone.
I have XML in following format, with timezone difference -05.00
<Order>
<EnteredDateTime>2009-10-29T18:52:53.43-05:00</EnteredDateTime>
</Order>