I am using Make.com to automatically fetch order data from an API on a daily basis. I need to get the Unix Timestamp for 00:00:00 and 23:59:59 of the previous day.
My Requirements:
startDateTime
should be 00:00:00 of the previous day as a Unix Timestamp.endDateTime
should be 23:59:59 of the previous day as a Unix Timestamp.- The formula must work correctly regardless of when the scenario runs.
What I have tried but didn’t work:
Keeps the current time of
now
instead of resetting to 00:00:00
make
Sao chépChỉnh sửa
{{formatDate(addDays(now; -1); "X")}}
{{formatDate(addSeconds(addDays(now; -1); 86399); "X")}}
- Issue: The returned timestamp does not represent 00:00:00 but retains the hour from
now
.
Concatenating the date with
00:00:00
and usingparseDate()
make
Sao chépChỉnh sửa
{{formatDate(parseDate(formatDate(addDays(now; -1); "yyyy-MM-dd") & " 00:00:00"; "yyyy-MM-dd HH:mm:ss"); "X")}}
- Issue:
" 00:00:00" is not a valid date or does not match the date format.
I need help to get the correct formula!
Does anyone have a correct and optimal way to retrieve the Unix Timestamp for 00:00:00 and 23:59:59 of the previous day in Make.com?
Thanks a lot for your help!