Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

create date question

hi

load ......

     belegpos.date,

     year(belegpos.date) as year,

     month(belegpos.date) as month,

     day(belegpos.date) as day,

     .......

from belegpos.qvd;

now when put a lsitbox where i should see the years or months or days there is no data. why???

belegpos.date is in the qvd like: 15/04/11 (MM/DD/YY)

thanks

1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Use parsing function date#() like:

load ......

     belegpos.date,

     Date(Date#(belegpos.date, 'MM/DD/YY')) as Date,

     year(Date#(belegpos.date, 'MM/DD/YY')) as year,

     month(Date#(belegpos.date, 'MM/DD/YY')) as month,

     day(Date#(belegpos.date, 'MM/DD/YY')) as day,

     .......

from belegpos.qvd

View solution in original post

7 Replies
tresB
Champion III
Champion III

Use parsing function date#() like:

load ......

     belegpos.date,

     Date(Date#(belegpos.date, 'MM/DD/YY')) as Date,

     year(Date#(belegpos.date, 'MM/DD/YY')) as year,

     month(Date#(belegpos.date, 'MM/DD/YY')) as month,

     day(Date#(belegpos.date, 'MM/DD/YY')) as day,

     .......

from belegpos.qvd

Not applicable
Author

hey

it seems that there are only the first 12 days of the month.

listbox:

day 1

     2

     3

     4

......

     12

end.

do you have an idea why?

tresB
Champion III
Champion III

Month field is coming ok?

Not applicable
Author

yes

tresB
Champion III
Champion III

Then, perhaps the data is so. Wait, i guess it should be 'DD/MM/YY' rather than 'MM/DD/YY'. Change the format code in date#() and try.

ashfaq_haseeb
Champion III
Champion III

Hi,

If you have different date formats, Then I suggest you to use ALT function.

Regards

ASHFAQ

Not applicable
Author

yes right, it's DD//MM//YY. my bad

thanks for your help