Hi,
Is there any function to convert the current DateTimestamp into the following ISO date format: 2009-07-29T11:20:32.0Z
Thanks
ISO Date Format Conversion
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 22
- Joined: Fri Oct 15, 2004 11:53 pm
- Location: Bangalore, India
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Which ISO standard specifies that format? What is "0Z"?
ISO 8601 (date and time formats) specifies YYYY-MM-DD HH:MM:SS with optional fractional seconds for a timestamp).
Conversion is only relevant if the target is a string data type.
ISO 8601 (date and time formats) specifies YYYY-MM-DD HH:MM:SS with optional fractional seconds for a timestamp).
Conversion is only relevant if the target is a string data type.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Apparently that's a Java implementation of an "ISO 8601" format and I keep seeing search results calling it a SimpleDateFormat. For example, go here and scroll down to Method Detail and the isoFormat entry. The 'Z' seems to be a timezone offset.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 22
- Joined: Fri Oct 15, 2004 11:53 pm
- Location: Bangalore, India
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
OK, you're probably going to need a fairly complex expression to effect the conversion from local time to UTC if the solution needs to be general, or use a constant offset for a limited result. (Incidentally, how is Indian Standard Time (4.5 hours offset) represented?)
The rest should just be decomposing the string, adjusting the hour (and, possibly, the day), then re-assembling the string. Should be able to do it all in stage variables.
The rest should just be decomposing the string, adjusting the hour (and, possibly, the day), then re-assembling the string. Should be able to do it all in stage variables.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.