Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!

How to compare dates in an automation

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Ionut_Dumitrascu

How to compare dates in an automation

Last Update:

Sep 29, 2021 12:42:51 PM

Updated By:

PietMichielRappelet

Created date:

Jun 23, 2021 7:51:53 AM

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 :

Ionut_Dumitrascu_1-1624447182935.png

or the information can be stored in different fields like this:

Ionut_Dumitrascu_0-1624447058480.png

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:

Ionut_Dumitrascu_3-1624447635541.png

 


The formula will have the following format:

Ionut_Dumitrascu_2-1624447583677.png
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:

Ionut_Dumitrascu_5-1624448427569.png

 

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.

Tags (1)
Labels (2)
Version history
Last update:
‎2021-09-29 12:42 PM
Updated by: