Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys, i'd like load a date/time in Load Script in this format hh:mm but in the extraction phase value return in this mode. What can i do to have a similar format? 7:00 - 8:00 - 9:00 - 10:00
In load script, I transform value with "Interval(ORARIO, 'hh:mm') as [Orario]," but isn't correct.
May you help me?
Thanks in advance
Your field was not numeric. I guess they have a blank sign in the beginning or end. I solved this by using trim()
See example script below where the maketime expression (Orario1) seems to give correct output:
SET TimeFormat='hh:mm';
NoConcatenate
Test:
LOAD
"Data Elaborazione",
"Ora dalle",
"Ora alle",
"Codice filiale",
Orario,
Time#(trim(Orario), 'hh:mm') as Orario2,
maketime(Floor(trim(Orario)/100)) as Orario1
FROM [lib://DateTimeFormat (laptop-afr743rk_vegar)/Test.qvd]
(qvd);
Try this:
Time#(ORARIO, 'hh:mm') as [Orario],
Hi, thank you for your response, but it's not working.
The result is the same. I woud like to have 7:00, 8:00, 9:00.
Any suggestions?
Thanks
It's working for me (see below and attached)
Where did you get the screenshot you posted above? It doesn't look like Qlik Sense
Also, have a look at the Data model viewer to check how data is actually being managed (maybe post a picture of the Data model viewer, of that specific field)
I've attached my .qvd and my .qvf. In both cases, it's not working.
In the previous one, I showed date by Qvd Viewer.
Try this
interval(num#(Orario,'####')/2400,'hh:mm') as Orario,
Your field was not numeric. I guess they have a blank sign in the beginning or end. I solved this by using trim()
See example script below where the maketime expression (Orario1) seems to give correct output:
SET TimeFormat='hh:mm';
NoConcatenate
Test:
LOAD
"Data Elaborazione",
"Ora dalle",
"Ora alle",
"Codice filiale",
Orario,
Time#(trim(Orario), 'hh:mm') as Orario2,
maketime(Floor(trim(Orario)/100)) as Orario1
FROM [lib://DateTimeFormat (laptop-afr743rk_vegar)/Test.qvd]
(qvd);
Thank you guys, now it's worked for me.
Thank you for your patience e for all support!