Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Ishragil
Contributor III
Contributor III

Multiple date lines where loading "Date and Hour" feild

Hi

I'm trying to load data about mushrooms picking from a table where the "Date" field, mentions date+hour of picking.

I've created a new Dimension for date, using:

DATE(MAKEDATE(1988) + UDATE/1440,'DD/MM/YYYY')   as  Date,

But the output us several lines for each date (the same amount of lines as if I leave the hour)

How can I consolidate all the lines for certain date to only one line?

 

Thanks a lot in advance

1 Solution

Accepted Solutions
Ishragil
Contributor III
Contributor III
Author

I am happy to update that I found the solution from a friend.

the solution is by using the function Datestart(), or to be more specific:

DATE(MAKEDATE(1988) + daystart(UDATE/1440),'DD/MM/YYYY') as Date,

View solution in original post

14 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 
if you want to convert seconds to date use this 

DATE(MAKEDATE(1988) + UDATE/86400,'DD/MM/YYYY')   as  Date,

Ishragil
Contributor III
Contributor III
Author

Thanks for your prompt reply.

I tried this but it converted all the dates to the year 1988 and left all the multiple lines

PrashantSangle

can you provide sample data with output?

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Ishragil
Contributor III
Contributor III
Author

Sure

Here is an example (Please ignore the Hebrew):

This is the data in the Priority (the source) with the date and the hour:

Ishragil_0-1606665705362.png

And here is the date from the Qlik:

Ishragil_1-1606666125851.png

The same 12 lines and the same total

I would like to consolidate them by the date to only one line per date

 

Ishragil
Contributor III
Contributor III
Author

In the first snapshot there only 10 lines appears out of the 12 lines

Kushal_Chawda

@Ishragil  did you try below

timestamp(MAKEDATE(1988) + UDATE/1440)   as  Date,

Ishragil
Contributor III
Contributor III
Author

Tried that, but still the same output:

Ishragil_1-1606669210549.png

 

rubenmarin

Hi, taht's beacuse each date is a different value because each one has a different time value, if want to keep only one value for each date you can use floor() to remove the time:

DATE(Floor(MAKEDATE(1988) + UDATE/1440),'DD/MM/YYYY')

Ishragil
Contributor III
Contributor III
Author

I did that:

Ishragil_0-1606676105832.png

and the result is still multiple lines, but some lines are missing (in the source there are 12 lines with 1163 Boxes):

Ishragil_1-1606676218759.png