Structure does not convert time to date correctly

Alex
Contributor
December 25, 2024

Hi!

I get the wrong date after using FORMAT_DATETIME(timestamp, "dd.MM.YY").

Example two times: 1722459600000 and 1735592400000

The first time is translated correctly and it is "01.08.2024".

But the second time is formatted as "31.12.25" instead of "31.12.24".

I calculated the amount of time between the times: (1735592400000 - 1722459600000) / (1000*60*60*24) = 152 days.

"01.08.2024"+ 152 days should be "31.12.24", but where did this extra year come from?

I tried using Local and TimeZone and it didn't help :(

1 answer

Suggest an answer

Log in or Sign up to answer
1 vote
Alex
Contributor
December 25, 2024

I found out that the whole thing was in the format "dd.MM.YY", I changed it to "dd.MM.yy" and everything became as it should be

TAGS
AUG Leaders

Atlassian Community Events