I am trying to use a Compare Timestamps bloc in a workflow to make a comparison between the current date (-1 day) and a startdate (coming from an identity attribute)
Do you know how I can manage the variable $.now() (wich seems to return the current date on ISO 8601 format) to make that comparison in that bloc ?
Can you explain your use case? Are you trying to perform some action when a user has started? Why do you need to get the current date minus one day? This will help us better provide a solution for you.
Sorry for our late answer, we have needed to do some tests.
Our need : We want to do some actions when identities have their stardDate is equals or lower than today-1 For example the table of action if the today date is 2023/07/03 :
Identity startDate => Do actions on Identity
2023-07-01 => Do actions
2023-07-02 => Do actions
2023-07-03 => Do actions
2023-07-04 => Do actions
2023-07-05 => NO actions
2023-07-06 => NO actions
We have found the operator βCompare Timestampβ that can help us but we have some issues with this.
Second Issue :
When I use βTimestampGreaterThanEqualsXDayβ, the equals is not OK Example with today date = 2023-07-03
Identity startDate => TimestampGreaterThanEqualsXDay with integer 0
2023-07-01 => KO
2023-07-02 => KO 2023-07-03 => KO (should be OK)
2023-07-04 => OK
2023-07-05 => OK
When I use βTimestampLessThanEqualsXDayβ, the equals is OK Example with today date = 2023-07-03
Identity => TimestampLessThanEqualsXDay with integer 0
2023-07-01 => OK
2023-07-02 => OK
2023-07-03 => OK
2023-07-04 => KO
2023-07-05 => KO
Third Issue :
When I use βTimestampLessThanEqualsXDayβ with integer 1, it should answer my need but the results are weird : Example with today date = 2023-07-03
Identity => TimestampLessThanEqualsXDay with integer 1
2023-07-01 => OK
2023-07-02 => OK
2023-07-03 => KO (should be OK)
2023-07-04 => KO (should be OK)
2023-07-05 => KO
The beta tag is mainly because it is not where we want it to be for a goal UI/UX experience. The functionality works and was tested thoroughly. Some caveats apply such as chaining operations where you have date or number formatted values then want to chain a string manipulation. Those will not be supported until the goal experience meaning you will need to use multiple Define Variable operators.