Check if a timestamp is before/after a certain hour


In Integromat/make, how can I check if a timestamp is before 5.00am? I want a variable that returns true if a timestamp is before 5am and false if its after 5am.


there are a few ways to do this but I would use the Unix Time stamp (ie the number of seconds since Jan 1 1970) and then create a nested formula to subtract that unix timestamp from the UNIX timestamp of 5am of the date in question. If it the result is +ve then the time must have been after 5am. If it was -ve then it will have been before.

This is how you get the UNIX timestamp:

{{formatDate(YOURDATE; "x")}}

I’ll post this response just now - hopefully it makes sense but if you need more help just shout and I’ll create an example when i have second.

1 Like

actually, much a much simpler way - just use formatDate to turn your time into hours, format it as a number and then run an if statement. Here you go:

{{if(parseNumber(formatDate(now; "HH")) + "<5"; false; true)}}

Replace “now” with your time field

1 Like