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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

Timeformat

Hi Guys,

I have two field call Arrival_Time and Departure_Time

The format for this two time is

10/01/2012 16:48:00

and

01/02/2012  20:00:00

I need to find the difference of this two time(Arrival and Departure) via Days

Any ideas on how I can do it, thank you

1 Solution

Accepted Solutions
Not applicable

Extract date from both the dates using Function DATE and then convert it into number format and then operate the subtraction

Num(Date (Arrival_Time,'DD/MM/YYYY')) - Num(Date (Departure_Time,'DD/MM/YYYY'))

another way is

using the same technique, convert into date and then use DATEDIFF function.

View solution in original post

3 Replies
sushil353
Master II
Master II

Hi,

Check out interval function:

interval( A-B, 'D hh:mm' ) where A=97-08-06 09:00:00 and B=96-08-06 00:00:00 returns:

   

String

365 09:00

Number

365.375 

HTH

Sushil

kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

Try the below syntex.

EX : =Interval(Arrival_Time-Departure_Time,'DD')

Not applicable

Extract date from both the dates using Function DATE and then convert it into number format and then operate the subtraction

Num(Date (Arrival_Time,'DD/MM/YYYY')) - Num(Date (Departure_Time,'DD/MM/YYYY'))

another way is

using the same technique, convert into date and then use DATEDIFF function.