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

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
VishalWaghole
Specialist II
Specialist II

Date Issue

Hi Community,

i have created date by using makedate function, like

LET vDate = makedate(2013,12,31);

after that i am loading this date like

Load Date($(vDate)) as CurDate

AutoGenerate vDate + 0;

But it will give me two different output.

vDate variable giving me result as = 12/31/2013

and

CurrDate giving me result as = 12/30/1899

Why CurrDate returning different output??

-Regards,

Vishal Waghole

3 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

For Date() and AUTOGENERATE, your date 12/31/2013 is a double division that evaluates to something smaller than 1. Date 0 (probably) equals 12/31/1899.

Also when actually using the day number of 12/31/2013 in your autogenerate clause, you will most likely generate thouands of records, all with the same date. IS that what you want, or do you want to use IterNo() or RowNo()?

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Remember, Dollarsign expansion is actually TEXT substitution.

Peter

rbecher
MVP
MVP

Hi Vishal,

you need qoutes here:

Load Date(Date#('$(vDate)')) as CurDate

AutoGenerate 1;

- Ralf

Data & AI Engineer at Orionbelt.ai - a GenAI Semantic Layer Venture, Inventor of Astrato Engine