How to calculate days between dates, returns empty

Hi,
I would like to get ages from the dates of birth , but the function round(...) it returns empty.

I create these variables now and birhday to debug my module, for me all is okay but I cannot explain why age and D2-D1 returns always empty

Thanks,


https://www.make.com/en/help/functions/date---time-functions#how-to-calculate-days-between-dates

You should not have done a formatDate to perform math operations (subtraction) on the two dates.

and you definitely do not need to do any parseDate on the now variable, which is already a date type variable.

So it should look something like this:

{{(now - parseDate(118.dateOfBirth; "YYYY-MM-DD")) / 31556952000}}

31556952000 : milllis in year

samliewrequest private consultation

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

4 Likes

Thanks @samliew, you are the best of Make.com :grin:

2 Likes