Useage of Datediff functions

Hello all,
I’ve been strugling using the Datediff function, could someone give me an exemple of how it works?
I’ve done many test but always resulting in an error message.
For example from
{{dateDiff(“2024-11-11”; “2024-11-13”; “days”)}} I would like to have 2

Many thanks for your help.

1 Like

Hi Timothe, welcome to the community. When you use date difference function make sure you subtract the smaller date from the larger one. In the function you provided you have used days which is not a valid unit

Try this function it would work

{{dateDiff("2024-11-13"; "2024-11-11"; "D")}}

output

2 Likes

Do you know the options for the different units by any chance? This function seems to be undocumented.

thanks for your anwser! I would be interested too if you have the different unit option as I can not find any documentation related to that

Not sure but i guess it should go like d=days w=weeks m=months