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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Time Format

Hello guys! I have a question that must been very dumb but I can´t find the solution :(. I have in a column numbers as 312.5, 350.4 …which represent hours and mins.

I would like to have these numbers in the following format 312.5 as 312:50:00, 350.4 as 350:40:00..

Anny idea?

Thank you!!

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Table:

LOAD *,

  Interval(Interval#(Floor(Time), 'h') + Interval#(Round(Frac(Time) * 100), 'mm'), 'h:mm:ss') as New_Time;

LOAD * Inline [

Time

312.5

350.4

];


Capture.PNG



View solution in original post

4 Replies
Chanty4u
MVP
MVP

try this

stampp:

LOAD * INLINE [

    date

    312.5

    350.4

];

Result:

LOAD *,

Timestamp(Timestamp#(date,'hhh.m'),'hh:mm:ss') as new

Resident stampp;

stam.PNG

puttemans
Specialist
Specialist

Hi,

If your values are correct, then try

subfield( time, '.', 1)&':'&(subfield(time, '.',2)*10)&':00' as newtime

where 'time' is the name of your original value, and newtime the new variable.

Regards,

Johan

sunny_talwar

May be this:

Table:

LOAD *,

  Interval(Interval#(Floor(Time), 'h') + Interval#(Round(Frac(Time) * 100), 'mm'), 'h:mm:ss') as New_Time;

LOAD * Inline [

Time

312.5

350.4

];


Capture.PNG



Not applicable
Author

Thank You very much Sunny T.

It worked perfectly!!