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

Conversion of time

Hi,

I have a field in my table "Time_Duration" as EX- '00:00:15' , '00:02:11', '01:12:40'.

I want to calculate duration in seconds like 15 , 131 seconds etc from above format..

Please post your Ideas.

Thanks,

Arun

2 Replies
swuehl
MVP
MVP

If you want to keep the underlying format, just display as seconds:

=interval( Time_Duration, 'ss')

If you wan to convert the time to a an integer showing seconds:

=num#(interval( Time_Duration, 'ss'))

(Difference will be more relevant when you perform subsequent calculations with the resulting values)

sasiparupudi1
Master III
Master III

load Time_Duration ,

interval(Time_Duration,'ss') as Time_DurationSeconds

inline

[

Time_Duration

00:00:15

00:02:11

01:12:40

];

Please close the thread if you got your answer