Expand my Community achievements bar.

SOLVED

Date Format in Fusion

Avatar

Level 2

How do i format this date /Date(1675832400000-0500)/ in Fusion?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Richard is correct in that the 0500 represents time zone offset.

 

In Make, formerly Integromat (what Fusion is based on), you can use the parseDate function to parse a timestamp with a timezone offset. The parseDate function takes three arguments: text, format, and timezone. The first argument is the text value representing the date, the second argument is the format of the date, and the third argument is an optional timezone.

Here’s an example:

parseDate("1675832400000-0500"; "xZ"; "UTC")

This will parse the timestamp “1675832400000-0500” using the format “xZ” (where “x” represents an epoch timestamp in milliseconds and “Z” represents a timezone offset) and return a Date value in UTC.

 

More HERE

View solution in original post

6 Replies

Avatar

Community Advisor

I would expect this to work:

Rafal_Bainie_0-1678348833638.png

but I got this in response, so I'm not sure if that is a valid date:

Rafal_Bainie_1-1678348874056.png

 

Avatar

Community Advisor

Hi,

 

This looks like a Unix ms timestamp. Try parsing the date and specifying "x" (which represents Unix) as the format, and nest that into a format date function. It would look something like this:

 

Screenshot 2023-03-09 101955.jpg

 

The only thing i'm not sure of is the -0500 which I guess is meant to represent timezone. Unix timestamps in their very nature are timezone independent, so the date you have provided (1675832400000-0500) is not a valid format. I suspect that you will need to trim this value down to read only the date/time element of this string (everything preceding "-0500") and then apply the relevant timezone adjustments in another function or a subsequent module.

 

Hope this helps.

 

Best Regards,

Rich. 

 

 

Avatar

Correct answer by
Community Advisor

Richard is correct in that the 0500 represents time zone offset.

 

In Make, formerly Integromat (what Fusion is based on), you can use the parseDate function to parse a timestamp with a timezone offset. The parseDate function takes three arguments: text, format, and timezone. The first argument is the text value representing the date, the second argument is the format of the date, and the third argument is an optional timezone.

Here’s an example:

parseDate("1675832400000-0500"; "xZ"; "UTC")

This will parse the timestamp “1675832400000-0500” using the format “xZ” (where “x” represents an epoch timestamp in milliseconds and “Z” represents a timezone offset) and return a Date value in UTC.

 

More HERE

Avatar

Community Advisor

The Make help center has WAY better documentation than Fusion has. It isn't Workfront specific like Fusion but it's still super useful.

Make Help center