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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Difference between two time stamp

Hi all,

I need to find out the difference between two timestamp in minute.

E.g:- Date1 :-1/8/2013 20:55

         Date2:- 1/9/2013 29:55

Expected result:- (Date2- Date1) = 1380 min.

Kindly help me find out this.

Thanks ,

D J

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi,

You may try this in text object

=Interval(Date#('1/9/2013 29:55','MM/DD/YYYY hh:mm')-Date#('1/8/2013 20:55','MM/DD/YYYY hh:mm'),'mm')

Regards,

Sokkorn

View solution in original post

7 Replies
Sokkorn
Master
Master

Hi,

Maybe you can try Interval(Date2-Date1,'mm')

Regards,

Sokkorn

vivientexier
Partner - Creator II
Partner - Creator II

=Interval(Date1 - Date2, 'mm')

Of course, you can use another format (example : 'D hh:mm')

Not applicable
Author

it's not working.

vivientexier
Partner - Creator II
Partner - Creator II

Ok, are you sure your date is really a date and not text. multiplie your Date field by one to be sure to get a numeric and not text.

vivientexier
Partner - Creator II
Partner - Creator II

=Interval(Now() - Addmonths(Today(), -2), 'mm')

Try this, it is working fine. Your date format may be wrong.

Sokkorn
Master
Master

Hi,

You may try this in text object

=Interval(Date#('1/9/2013 29:55','MM/DD/YYYY hh:mm')-Date#('1/8/2013 20:55','MM/DD/YYYY hh:mm'),'mm')

Regards,

Sokkorn

Anonymous
Not applicable
Author

Can Also Try

which gives more precise answer

(num((Timestamp(Timestamp#('2013-1-9 19:55','YYYY-MM-DD hh:mm'))-

Timestamp(Timestamp#('2013-1-8 20:55','YYYY-MM-DD hh:mm')))))*24*60