Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem creating Calendar

Hello,

can anyone tell me why this is wrong?

LET EndCalendar = YearEnd(today());

LET StartCalendar= '01.01.' & (Year(today())-1);

LOAD Date($(StartCalendar) + rowno() -1) as TempDate

AutoGenerate $(EndCalendar) - $(StartCalendar) + 1;

I am getting a mistake debugging and I can't see why

Regards and thanks in advance!

Stef

1 Solution

Accepted Solutions
vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi Stef,

please use following script:

LET EndCalendar = Num(YearEnd(today()));

LET StartCalendar=Num(makedate((Year(today())-1),'01','01'));

LOAD Date($(StartCalendar) + RecNo() -1) as TempDate

AutoGenerate($(EndCalendar) - $(StartCalendar) + 1);

Regards

Vijay

View solution in original post

2 Replies
Not applicable
Author

PD: I am trying to create a calendar that contains the dates from the 1. January from last year until the 31. December of the current year..

vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi Stef,

please use following script:

LET EndCalendar = Num(YearEnd(today()));

LET StartCalendar=Num(makedate((Year(today())-1),'01','01'));

LOAD Date($(StartCalendar) + RecNo() -1) as TempDate

AutoGenerate($(EndCalendar) - $(StartCalendar) + 1);

Regards

Vijay