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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! 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
tresesco
MVP
MVP

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
tresesco
MVP
MVP

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?

tresesco
MVP
MVP

Month field is coming ok?

Not applicable
Author

yes

tresesco
MVP
MVP

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