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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
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

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

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
MVP
MVP

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
Champion III
Champion III

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
MVP
MVP

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