on 11-09-2007 2:02 PM
What java class/method does the TransformDate function use?
I'm trying to parse the following UTC formated date string with the TransformDate function.
<b><DateTime DateTimeQualifier="On">2007-11-02T20:17:28Z</DateTime></b>
According to the API Docs for <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html">Java Simple Date Format</a> says that the input mask should look like this:
yyyy-MM-ddTHH:mm:ssZ
Integration builder chokes on the "T" literal character. Wrapping the T in single (or double) quotes doesn't get it done either.
How have you solved transformed date strings like this?
The solution wasn't optimal, but I used the "replaceString" function to strip out the characters that didn't fit the Simple Date Format mask.
Once I stripped out the "T" and "Z" characters, we could parse the date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
AFAIK the DateTrans function might not be able to comprehend <b>2007-11-02T20:17:28Z</b> coz of "T",a way around can be to write a simple UDF which will take <i>2007-11-02T20:17:28Z</i>(<DateTime>) as a input,then use substring function to chop off segments of it and then you can concat them in whatever format you want.just make sure that the source and target field must be xsd:string.
if you can do it with just DateTrans function then let us know
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Our time zone is GMT -06:00. Once you chop the "Z" from the string the date/time string your date effectively becomes "local" time.
If the time component was important to this integration scenario, we'd would need to take steps to preserve the time accurately. I think we'd have to replace the "Z" with "-06:00"
Thanks for the help!
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.