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

my calendar year return 1905

Hi All

I have sales table date from 2009 till 2013. and my Exp target date year = 2009

after combine both date to my master calendar i get year = 1905

may i know where i make the mistake ?

Paul

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Paul,

You are loading your SalesDate and then using Year() on that to create your Year-field. The SalesDate is already a year field (Values from 2009-2013).

The QlikView date counter starts from 1899-12-31 which is equal to 1, 1900-01-01 = 2, 1900-01-02 = 3 etc.

So, if you do Year(2009) for example, you will take the year of 2009 days after 1899-12-31 which is in year 1905, so the calculation is absolutely correct.

What you need to do is to use an actual date when extracting your year, not use an already formatted year field.

View solution in original post

2 Replies
Anonymous
Not applicable

Hi Paul,

You are loading your SalesDate and then using Year() on that to create your Year-field. The SalesDate is already a year field (Values from 2009-2013).

The QlikView date counter starts from 1899-12-31 which is equal to 1, 1900-01-01 = 2, 1900-01-02 = 3 etc.

So, if you do Year(2009) for example, you will take the year of 2009 days after 1899-12-31 which is in year 1905, so the calculation is absolutely correct.

What you need to do is to use an actual date when extracting your year, not use an already formatted year field.

paulyeo11
Master
Master
Author

Hi Sir

you are very sharp.

http://community.qlik.com/message/361850#361850

How about the above ? why my Target date not link to my sales date ? after i make use of link table.

Paul