
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Date/Time format in Load Script
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
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
Qlik Community MVP


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
Time#(ORARIO, 'hh:mm') as [Orario],

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this
interval(num#(Orario,'####')/2400,'hh:mm') as Orario,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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);
Qlik Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you guys, now it's worked for me.
Thank you for your patience e for all support!
