Date to Timestamp conversion
Moderators: chulett, rschirm, roy
Date to Timestamp conversion
Hi Gurus,
I have timestamp field coming from informix database (12/15/2008 10:11:12 AM) and when i am using the data type for the target as Timestamp i am getting "2008-12-15T16:11:12.000Z" Not sure why i am getting this junk values "T" and "Z"...can anyone help me out..
Thanks in advance
I have timestamp field coming from informix database (12/15/2008 10:11:12 AM) and when i am using the data type for the target as Timestamp i am getting "2008-12-15T16:11:12.000Z" Not sure why i am getting this junk values "T" and "Z"...can anyone help me out..
Thanks in advance
First off, those are not "junk" values. The 'T' marks the date/time boundary and the 'Z' means Zulu time, a UTC offset of "00.00" in an ISO 8601 timestamp. See here for the standards, especially pages 2 and 7. What is your target?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
The Zulu format for xml is a good one. What is your actual error when going to a service?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
And is that an error? I am not sure what you want.
If you do what is your output?
If you do
Code: Select all
TimestamptoString(DSLink12.usg_begin_dt, "%yyyy-%mm-%dd %hh-%nn-%ss.5")
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
So, no actual error - you've just never seen that before and thought there was something wrong with it? Are you trying to send that to the webservice or getting it back from the webservice? Assuming the latter, just strip the "zulu" part and replace the "T" with a space.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Our problem is that we don't understand what your problem is.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>