Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Difference in minutes between 2 dates

Hey everyone,

I have date fields. for example : 03/10/2013 17:00:00

How can I calculate the difference between 2 date fields in minutes ?

Thanks for you help

Have a good day

Laura

3 Replies

Re: Difference in minutes between 2 dates

(Timestamp2-Timestamp1)*1440

Re: Difference in minutes between 2 dates

Use interval function i suggest like

Ex:-

Load

Interval( DateFieldA - DateFieldB, 'mm' )  as Difference

From Location;

other wise you can use Minute function Minute(DateField)

Regards

Anand

Not applicable

Re: Difference in minutes between 2 dates

Note that your suggestion for using Minute(DateField) will not work correctly as it only gives you the minute portion of an interval, so if the difference was 1 hour and 12 minutes, Minute (DateField) will return 12 minutes, not 72 minutes as you would want

Your Interval answer would work though

Community Browser