Datetime comparison operator

Hello everybody,

what’s the right way to compare two date fields (not in filter)?

I have two timestamps in two different Mailchimp Audiences:

A: 2024-01-24T08:24:33.000Z
B: 2024-01-24T08:26:23.000Z

I want to determine if A or B happened first. A and B are of type date.

What is the right comparison operator?

Hi, thank for the answer, but i can’t see such function toTimestamp().

I want to calculate it and store the value in a merge field.
On the image is what I want to achive (this of course is not working)
Both 1.timestamp_opt and 3.timestamp_opt are of type date.

Okay
i could have also suggested you to user format date but the solution was easier that way

I’ve finally managed to achieve this like this:

{{ if(parseNumber( formatDate(A; "x"); ",") > parseNumber(formatDate(B; "x"); ","); "regis_last"; "subs_last")}}

where A and B are datetime vars

Could you explain where this toTimestamp function can be found? I suspect you are using some form of AI, because only AI can come up with stuff that doesn’t exist (also called hallucinations).

You cannot use AI like ChatGPT to answer questions on this forum, because AI has no knowledge of Make’s capabilities, functions, apps, and modules. Please do not use AI to generate answers on this forum.