Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
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