Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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