Describe the problem/error/question
I’m trying to take a date timestamp as an output from a previous node, and check if it was within the last day. i’ve determined i’m able to turn the timestamp string into a date object using the following expression:
{{ DateTime.fromISO($json[“My Timestamp”])}}
Using n8n’s built-in expression .isInLast()
, the boolean result always returns false. I’ve used the following syntax:
{{ DateTime.fromISO($json[“My Timestamp”]).isInLast()}}
{{ DateTime.fromISO($json[“My Timestamp”]).isInLast(1 day)}}
{{ DateTime.fromISO($json[“My Timestamp”]).isInLast(1, day)}}
The following screenshots display tests.