Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Time detail not reflecting

Hi,

Am used the below logic at script level to get the time format,

Script level:   'Time(Time#(BGCMTM, 'hhmmss'), 'hh:mm:ss') as Reporting_Time'


But am getting an issue like as below(For 8:00:00 and 9:00:00 times were missing but in bakend it is available).

image001.png

Thanks..

13 Replies
nareshthavidishetty
Creator III
Creator III
Author

It's rounding to 7:59:00 t0 8:00:00,


Time(Ceil(Time#(Num(BGCMTM, '000000'), 'hhmmss'), (1/(24*60))), 'hh:mm:ss') as New_Time


Thanks...

sunny_talwar

It should have been rounding down to the nearest minute, but you want to round down to nearest hour, try this:

Time(Floor(Time#(Num(BGCMTM, '000000'), 'hhmmss'), (1/24)), 'hh:mm:ss') as New_Time

sunny_talwar

You can try these also:

Time(Round(Time#(Num(BGCMTM, '000000'), 'hhmmss'), (1/24)), 'hh:mm:ss')

or

Time(Floor(Time#(Num(105900, '000000'), 'hhmmss'), (1/24)), 'hh:mm:ss')

or

Time(Ceil(Time#(Num(105900, '000000'), 'hhmmss'), (1/24)), 'hh:mm:ss')

nareshthavidishetty
Creator III
Creator III
Author

Thanks Sunny these were really helpful..