Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
realpixel
Creator
Creator

hours import Excel

Hello,

In excel file, I have a field "HEURE2" with hour at format 23:02:09 (hh:mm:ss)

I try different kind of cell format in Excel, standard, hh:mm:ss, etc.

When this field is loaded in QV, "HEURE2" appears like that

0,959826388888889

I use this script unders to format the hours

LOAD HMIMMAT1,

     LOCATIONS,

     HMDATE1,

     HEURE3,

     HEURE2,

     if(Hour(time#([HEURE2],'hh:mm:ss'))>= 07,if(Hour(time#([HEURE2],'hh:mm:ss' ) ) <= 18 ,'SHIFT1','SHIFT2'),'SHIFT2') as HEURE1

Someone have an idea?

1 Reply
hic
Former Employee
Former Employee

Which means that the formatting is lost. Just load HEURE2 like

     Hour(HEURE2, 'hh:mm') as HEURE2

And it will work.

HIC