Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlik__Vinodh
Partner - Creator II
Partner - Creator II

Time subtract between two time stamps

Dear All,

How to subtract this Timestamp( Start_Time - End_Time).

if any one knows this help me.

PFA for example file.


1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try like:

Load

          Interval(Time#(End_Time, 'hh:mm:ss TT')-Time#(Start_Time, 'hh:mm:ss TT'), 'hh:mm:ss') as TimeDiff

Update: 'TT' not 'tt'

View solution in original post

6 Replies
PrashantSangle


Hi,

Use Interval().

For details see in help menu.

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

Try like:

Load

          Interval(Time#(End_Time, 'hh:mm:ss TT')-Time#(Start_Time, 'hh:mm:ss TT'), 'hh:mm:ss') as TimeDiff

Update: 'TT' not 'tt'

senarath
Creator III
Creator III

Hi,

Function is Interval.

=Interval(time02 - Time01,'hh:mm')

thanx

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=Interval(Timestamp#('3:19:21 AM', 'h:m:ss TT')

- Timestamp#('3:15:00 AM', 'h:m:ss TT'), 'h:m:ss TT')

LOAD

*,

Interval(Timestamp#(EndTime, 'h:m:ss TT')- Timestamp#(StartTime, 'h:m:ss TT'), 'h:m:ss TT') AS TimeDifference

From DataSource;

Regards,

Jagan.

aveeeeeee7en
Specialist III
Specialist III

Hi

Create a field in your backend Script:

Interval(END_TIME - START_TIME,'hh:mm:ss')  AS Time_Subtract

It will give you desired Result.

Also, see the Attachment.

Regards

Aviral Nag

MK_QSL
MVP
MVP

Add one more line in your script...

Interval(Time#(END_TIME,'h:mm:ss TT')-Time#(START_TIME,'h:mm:ss TT'),'h:m:ss') as TimeDifference