Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Timestamp Subtract

Hi

Below is the requirement

MAR                                                        ALT_TIME                                                                   ACT_TIME

XXXXXXXXXXXXXX                             2015-01-27T04:54:54.62Z                                              2015-01-27T07:43:10.49Z

How to find the difference in the Timestamp

Regards,

Senthil

1 Solution

Accepted Solutions
swuehl
MVP
MVP

If you need to interprete the timestamps:

=interval(

(date#(subfield('2015-01-27T07:43:10.49Z','T',1),'YYYY-MM-DD')+time#(TextBetween('2015-01-27T07:43:10.49Z','T','Z'),'hh:mm:ss.ff'))

-

(date#(subfield('2015-01-27T04:54:54.62Z','T',1),'YYYY-MM-DD')+time#(TextBetween('2015-01-27T04:54:54.62Z','T','Z'),'hh:mm:ss.ff'))

,'hh:mm:ss.ff')

View solution in original post

4 Replies
PrashantSangle

Hi,

Use Interval()

like Interval( ACT_TIME- ALT_TIME,'hh:mm')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
swuehl
MVP
MVP

If you need to interprete the timestamps:

=interval(

(date#(subfield('2015-01-27T07:43:10.49Z','T',1),'YYYY-MM-DD')+time#(TextBetween('2015-01-27T07:43:10.49Z','T','Z'),'hh:mm:ss.ff'))

-

(date#(subfield('2015-01-27T04:54:54.62Z','T',1),'YYYY-MM-DD')+time#(TextBetween('2015-01-27T04:54:54.62Z','T','Z'),'hh:mm:ss.ff'))

,'hh:mm:ss.ff')

PrashantSangle

Hi,

You can also try

Time(num(ACT_TIME - ALT_TIME),'hh:mm')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Thanks Mate