Help creating a proper formula to convert a time stamp

Hey anybody!

Can you help me figure out how to convert a timestamp that looks like this:

1682885203906

into something in accordance with this:

  • Enter your [time zone ID] This method is recommended to avoid errors during daylight savings time transitions. Example - Parameters:TimeZone=America/Chicago

or

  • Enter your GMT offset by indicating + or - and then the 4 digit time difference. (For example, New York’s offset is -0500, and Berlin’s is +0100). If you use Greenwich Mean Time, then simply enter +0000. Example - Parameters:TimeZone=-0500

Here’s what I came up with but I’m not sure it’s correct:
{{formatDate(parseDate(13.timestamp; “x”); “yyyy-MM-DD HH:mm:ssZZ”)}}

Hi @johnematias,

UNIX timestamp that you have mentioned is independent of timezone so, the platform that you are sending the data as per my understanding requires you to transform the date to the required timezone.

If you are doing a parseDate or formatDate, you can pass the timezone parameters to it, if not it will by default use the timezone as per your organization settings. So, In your case what you can simply do is,

{{formatDate(parseDate(13.timestamp; “x”;America/Chicago); “yyyy-MM-DD HH:mm:ssZZ”)}}

Or, Do the same in the formatDate parameters as well.

2 Likes

Heya @johnematias happy Friday :wave:

I just wanted to jump in real quick and check if @Runcorn’s suggestion hit the bullseye for you.

If it did the trick, could you please mark his reply as the solution? :white_check_mark: That way, we can keep our community neat and tidy, and make it easier for others to find helpful solutions.

Thanks a bunch!

1 Like