Hello!
Is it possible to only pass on the flow if the date is the same?
I have several payloads where there are dates in payload.date.
2023-05-25
2023-05-12
2023-05-01
2023-05-04
2023-04-25
2023-03-10
2023-04-25
2023-05-26
2023-05-22
2023-04-28
Is it possible to only pass on your payload if the date is the same or older.
eg. today is 2023-04-28 then the following should continue.
2023-04-28
2023-04-25
2023-03-10
2023-04-25
I hope someone can help me.
If these dates are string as you have shown, then a simple, less than or equal <=
to comparison is perfectly viable. You can use a switch node for that.
Hello!
Thank you for your answer.
Do you have an example?
@madmax
As per @Steve-Mcl suggestion, In a switch node.
set the property to an expression.
$millis() >= $toMillis(payload.date)
$millis
= Now in ms
$toMillis
= Converts a timestamp to ms
you can then react accordingly
Thank you for your answer works great.
system
Closed
12 May 2023 18:27
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.