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

Number to timestamp

hi,

Which function in QV can I use to convert a number eg 54620 to hh:mm:ss?

Regards,

Kevin

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Hi,

what is your expected output here.

Try like below

=interval(timestamp#(54620, 's'), 'hh:mm:ss')  --> 15:10:20

Or

=Time#(Left(Repeat('0',6-Len(54620))&54620,2) & ':' & Mid(Repeat('0',6-Len(54620))&54620,3,2)& ':' &Right(Repeat('0',6-Len(54620))&54620,2),'hh:mm:ss')   --> Returns 05:46:20

Regards

ASHFAQ

View solution in original post

11 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

what is your expected output here.

Try like below

=interval(timestamp#(54620, 's'), 'hh:mm:ss')  --> 15:10:20

Or

=Time#(Left(Repeat('0',6-Len(54620))&54620,2) & ':' & Mid(Repeat('0',6-Len(54620))&54620,3,2)& ':' &Right(Repeat('0',6-Len(54620))&54620,2),'hh:mm:ss')   --> Returns 05:46:20

Regards

ASHFAQ

amit_saini
Master III
Master III

Kevin,

Like this????

=Time(Time#('9690','ss'),'hh:mm:ss') ---------2:41:30 (Output)

Thanks,

AS

PrashantSangle

Hi,

Use like

Time(54620,'hh:mm:ss')

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 🙂
MarcoWedel

Hi,

maybe like this?:

QlikCommunity_Thread_130811_Pic1.JPG.jpg

hope this helps

regards

Marco

manideep78
Partner - Specialist
Partner - Specialist

Like this

=TimeStamp(Timestamp#('54620','hmmss'),'hh:mm:ss')

jagan
Partner - Champion III
Partner - Champion III

Hi Kevin,


Try like this


If time is in hmmss format

TimeStamp(Timestamp#('54620','hmmss'),'hh:mm:ss')


If 54620 is seconds then try like this

=interval(timestamp#(54620, 's'), 'hh:mm:ss')  --> 15:10:20


Regards,

Jagan.



Not applicable
Author

works! cheers

Not applicable
Author

works! cheers!

Not applicable
Author

didn't return the correct timestamp, cheers though.