IF Node: error startsWith/endsWith


I am trying to use this condition (first date contains second one) and I always get a false result

Both dates are converted to string.

Is there anything wrong?


Not sure where that data is coming from but is it possible that one of the dates is an actual Date-Object and not a string? Because then adding .toString() should solve that problem.

Thanks Jan.

I have decided to implement it in another way because it didn’t work (all variables were strings).

If I find the same problem again, I will let you know.


I had a similar problem with dates and IF-Nodes in context of timezones. Maybe, it’s the same root cause.
Strange Date/Timezone Bug is misleading in IF-Node · Issue #1380 · n8n-io/n8n (github.com)