Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date(Date#)) function yields many duplicates

Hi all,

I am importing from an ODBC server orders with their request date.

I would like to plot this in a chart where the dimension is YYYYMM, whereas the request date in the ODBC field is YYYYMMDD.

Therefore I wrote in the script

Date(Date#(LRDTE, 'YYYYMMDD'),'YYYYMM') AS RqstDte

It turns out fine and dates are imported as YYYYMM.

But, if I look in the list box, all the YYYYMM values are repeated as many times as the number of orders connected to them.

Further, when I plot the chart, of course it displays all these repeated months in the dimension.

It seems like that the Date(Date#)) function formats correctly the date, but indeed keeps stored the 'DD' information hidden somewhere.

Which formula shall I use to have QV sees the dates univocally?

Thank you for your help!

10 Replies
adamhutch
Contributor
Contributor

This works to get year and month, but how would you reduce the duplicate individual dates?