Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
helen_pip
Creator III
Creator III

Date Field as minutes

Hello

I want to be able to find the difference in minutes between Arrival Date and Time and Left Department Date and Time

I have written the following and get an output of 04:00.   I then want to write an If statement where I require the below to show data in minutes, so I can state when something is >=240 (4 Hours)

I ideally need to convert this into minutes in the script, can anyone help?

 

Date

([Left Department Date]+[Left Department Time])-Date([Arrival Date]+[Arrival Time])as date

Thanks

Helen

2 Replies
Not applicable

try this

(date([Left Department Date]) & time([Left Department Time]))-(Date([Arrival Date]) & time([Arrival Time])) as date

or try this

interval(date([Left Department Date]) & time([Left Department Time]))-(Date([Arrival Date]) & time([Arrival Time])) as date

swuehl
MVP
MVP

To show the interval in minutes:

=interval([Left Department Date]+[Left Department Time])-([Arrival Date]+[Arrival Time]), 'mm')

to compare with 240 minutes:

=if ( ([Left Department Date]+[Left Department Time])-([Arrival Date]+[Arrival Time]) >= interval#( 240, 'mm'), '>= 4 hours')