Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Time format

Hello,

The format of the time in the files I load is not how I want it to be and I need to change it.

This is the format of the files:

VirtualStockingTime.PNG

- After I add "Time(Time#...." some rows is correct, but some are not. Ex. Orig time 74752 (07:47:52) --> 03:15:02

- I guess that when the time is not equal to "hhmmss" it becomes an issue.

- How can I add in the script that some rows in the file are in this format "hmmss" and should be presented as "hh:mm:ss"?

* And another question is regarding the field "Completed time". This is in another format where ex. 15.15 = 15:09  (60*0,15=9)

- I want it to be presented as the previous example "hh:mm:ss"

Capture2.PNG

Capture.PNG

Thanks in advance!

1 Solution

Accepted Solutions
sunny_talwar

See if this is better

=Interval(Interval#(Num#([Completed Time], '##,##', ',', '.')*3600, 'ss'), 'hh:mm:ss')

View solution in original post

15 Replies
antoniotiman
Master III
Master III

HI,

Time(Time#(Num([Action Time],'000000'),'hhmmss'),'hh:mm:ss')

Regards,

Antonio

sunny_talwar

This should also work

Time(Time#([Action Time],'hmmss'),'hh:mm:ss')

qv_testing
Specialist II
Specialist II

try this,

=interval(Avg(YourField)/86400,'hh:mm:ss')

Anonymous
Not applicable
Author

Thanks Antonio!

Anonymous
Not applicable
Author

Should this be in the script? Because I get an error when I add this to the script.

sunny_talwar

If you got what you wanted, please close the thread by marking correct and helpful responses.

Best,

Sunny

Anonymous
Not applicable
Author

My first question is answered. Still need help with the second.

sunny_talwar

May be this?

=Interval(Interval#(15.15*60, 'mm'), 'hh:mm:ss')

assuming 15.15 is 15 hours and 9 minutes

sunny_talwar

Or more generally

=Interval(Interval#([Completed Time], 'mm'), 'hh:mm:ss')