Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
peisenrot
Contributor III
Contributor III

when loading script the date is shown not as one date

Hello,

I am loading from script 

LOAD
SnapshotDate,
date(SnapshotDate,'M/D/YYYYY') as Snapshot1
FROM [lib://ASUX QDF/99.Shared_Folders/2.QVD/1.Extract/PV_HistHeadcount.qvd]
(qvd);

and when I then look on the result I see: 

peisenrot_0-1675318893038.png

I have expected in Snapshot1 to have only one time 2/1/2023. Above is showing two different tables. Also when I add this on a line chart I can see the snapshot date more then one time. What to do?

Best regards

 

Pia

 

Labels (4)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

Try

date(Floor(SnapshotDate),'M/D/YYYYY')

The Date() function does not remove the time part - it just formats it. But the Floor() rounds to integers. 

See also
https://community.qlik.com/t5/Design/Get-the-Dates-Right/ba-p/1476178
https://community.qlik.com/t5/Design/Why-don-t-my-dates-work/ba-p/1465849

View solution in original post

1 Reply
hic
Former Employee
Former Employee

Try

date(Floor(SnapshotDate),'M/D/YYYYY')

The Date() function does not remove the time part - it just formats it. But the Floor() rounds to integers. 

See also
https://community.qlik.com/t5/Design/Get-the-Dates-Right/ba-p/1476178
https://community.qlik.com/t5/Design/Why-don-t-my-dates-work/ba-p/1465849