Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
prees959
Creator II
Creator II

Convert hh:mm:ss to hh:mm

Hi All,

I'm importing numerous time fields from a qvd which are being imported as hh:mm:ss.

I only require hh:mm and I'm trying to use time(floor(MyTimeField,1/(24*60)),'hh:mm') to remove the 'ss' section of the time.


However, this is only working for some of the records.  I'm now getting a mixture of hh:mm:ss and hh:mm.......

Can anyone advise please?

Many thanks,

Phil

14 Replies
sunny_talwar

Can you share a image of what you are seeing?

Anonymous
Not applicable

a non effective solution could be

Interval(Floor(Interval#(text(YOURFIELD),'hh:mm:ss')),'hh:mm')

prees959
Creator II
Creator II
Author

Hi,

This is the result:

time.PNG

vishsaggi
Champion III
Champion III

What do you see if you use this?

= Time(MyTimeField, 'hh:mm')

sunny_talwar

Floor will make the time 0, you might need to add 1/(24*60) within floor

sunny_talwar

Is it possible that there are two different sources for the field? One is formatted right and other one not?

Anonymous
Not applicable

try changing the Listbox settings to

and post the result

prees959
Creator II
Creator II
Author

I am looping through a folder of CSV's and converting these directly to QVDs all the CSV files are identical..... I'm concatenating all the QVDs and trying to convert the timestamps at this point....

Before I attempt any field conversions all values are hh:mm:ss

prees959
Creator II
Creator II
Author

all values are set to 00:00