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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

TalendDate format timestamp with timezone

Hi there,

I have a timestamp string in following format

"2021-08-12T02:00:00+10:00"

What is the best way to format this so that +10:00 is added and I get time as "2021-08-12 12:00:00"

Thanks

B

Labels (2)
2 Replies
gjeremy1617088143

Hi,You have to use the TalendDate.parseDate routine with this pattern yyyy-MM-dd'T'HH:mm:ssXXX .

Anonymous
Not applicable
Author

I followed your advice as follows:

String date = "2021-08-12T02:00:00+10:00";

System.out.println( TalendDate.parseDate("yyyy-MM-dd'T'HH:mm:ssXXX", date));

 

Result I get is Thu Aug 12 02:00:00 AEST 2021

 

However, I would like +10 added so that I get "2021-08-12 12:00:00" or 12/08/2021 12:00