Dealing with dates in an automation can be a bit tricky, mostly because of the format they come with.
For example, the date can be stored in a single string :
or the information can be stored in different fields like this:
In most cases, the dates that need to be compared have different formats, so the most important thing is to apply the same format to both. An easy way to do this is to use the 'Epoch timestamp conversion' format. To do this, we need to use the 'Date' formula:
The formula will have the following format:
where 'now' can be replaced by any date input and 'Uv' represents the 'Epoch timestamp conversion' format.
This will convert any date into 'Unix timestamp', for example: 'Date and time (GMT): Wednesday, June 23, 2021 11:21:23 AM' will be converted to: 'Timestamp in milliseconds: 1624447283000'.
Now in a condition block, we can use the formated dates in order to compare them, for example:
The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.