Epoch Timestamp

Hi everybody :slight_smile:

I’m trying to convert a 13 digit epoch timestamp to a Date format.

I’ve tried following:
{{formatDate(parseDate(“table”; “X”); “MM/DD/YYYY”)}}
image

An example of the Output if I just query “table” without any formatting is:
1711101383673

This is the error message I’m getting:

The operation failed with an error. Failed to map ‘0.formula’: Function ‘formatDate’ finished with error! Function ‘parseDate’ finished with error! ‘table’ is not a valid date or does not match the date format.

Any help is appreciated! Thank You

Another question: Is there an option to convert my current timestamp to epoch and then compare it to the outputs of “table” ?

Maybe I should’ve added my use case: I’m trying to compare the highest epoch date from “table” to my current timestamp then send an alert if its above 12 hours apart.

So I thought I should parse the Epoch Output and then compare it to the current timestamp function.
→ Is there a way to get the max epoch date / most recent timestamp of “table” ?

According to the Tokens you can use to parse a date variable, you can use a uppercase “X” divided by 1000

e.g.:

{{ formatDate(parseDate(1.date / 1000; "X"); "MM/DD/YYYY") }}

Screenshot_2024-05-21_194541

Here are some useful links and guides you can use to learn more on how to use the Make platform, apps, and app modules. I found these useful when I was learning Make, and hope they might benefit you too —

General

Help Center Basics

Articles & Videos

samliewrequest private consultation

Join the unofficial Make Discord server to chat with other makers!

3 Likes

Thank you Sam!

Do you know how to add Timezones to “now”?
image
image

this is the format I want for the output. The default timezone is UTC but I want it to CET.

I tried parsing “now” like this: {{parseDate(1.now; “x, CET”)}} but it didnt work.

Thanks!

The {{now}} special variable does not need any timezones, because it already represents the number of seconds past a fixed point in time.

Unless you meant a variable from another module that is named now, but is not the special {{now}} variable?

In that case, see https://www.make.com/en/help/functions/date---time-functions#parsedate--text--format---timezone--

Or, unless you meant formatting it to a user’s timezone?

In that case, see https://www.make.com/en/help/functions/date---time-functions#formatdate--date--format---timezone--

2 Likes