Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
talendbee
Contributor
Contributor

[resolved] Convert date time string to date time string in UTC time

Hi 

I need assistance in converting a non-UTC date time string below
"2016-01-09T09:00:00+10:00"
to string with UTC date time string, for the above string I would need string as one below,
"20160108230000"

Can somebody help please.

Regards
taendbee

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

1. convert your date string into a Date object.
2. Move the timezone by adding the hours needed with TalendDate.addDate(...)  <-- here you can add or subtract hours
3. convert the result date object back into you desired string format with TalendDate.formatDate(...)

View solution in original post

2 Replies
Anonymous
Not applicable

1. convert your date string into a Date object.
2. Move the timezone by adding the hours needed with TalendDate.addDate(...)  <-- here you can add or subtract hours
3. convert the result date object back into you desired string format with TalendDate.formatDate(...)
talendbee
Contributor
Contributor
Author

Thank you for reply. I did a test following your steps and I can get what I wanted.