Date Format in Fusion | Community
Skip to main content
abartimmo1
Level 2
March 9, 2023
Solved

Date Format in Fusion

  • March 9, 2023
  • 3 replies
  • 2290 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by RandyRoberts

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

3 replies

Rafal_Bainie
Community Advisor
Community Advisor
March 9, 2023

I would expect this to work:

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

 

Community Advisor
March 9, 2023

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:

 

 

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. 

 

 

RandyRoberts
Community Advisor
RandyRobertsCommunity AdvisorAccepted solution
Community Advisor
March 9, 2023

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

abartimmo1
Level 2
March 9, 2023

That worked great - thank you, Randy