Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In an example I have an epoch of 1708444826969 that I need convert into a UTC date and then to NZ and SE formats.
And I have done this so far
Convert epoch to long.
Long.parseLong(row4.time) as Var.epoch where row4.time is my epoch string
Convert that to UTC.
TalendDate.formatDateInUTC("yyyy-MM-dd HH:mm:ss",new java.util.Date(Var.epoch)) as Var.utc
which returns 2024-02-20 16:00:26 which seems correct.
Now I want to convert that UTC to NZ and SE date/times
I've tried this and its not working?
TalendDate.formatDateLocale("yyyy-MM-dd HH:mm:ss",TalendDate.parseDateInUTC("yyyy-MM-dd HH:mm:ss",Var.utc) ,"SE")
Any help would be appricated.
Bob
Hi
What is the output string you get? what are your expected output?
Regards
Shong
This is what is returned from this,
TalendDate.formatDateLocale("yyyy-MM-dd HH:mm:ss",TalendDate.parseDateInUTC("yyyy-MM-dd HH:mm:ss",Var.utc) ,"SE")
2024-02-20 10:00:26
Should be this for Sweden:
2024-02-20 17:00:26
And this for New Zealand:
2024-02-21 05:00:26