Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Hi,You have to use the TalendDate.parseDate routine with this pattern yyyy-MM-dd'T'HH:mm:ssXXX .
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