LET MinDate = Num(MakeDate(2013,1,1));
LET MaxDate = Num(Today()-1);
temp_DateField:
LOAD
$(MinDate) + rowno() -1 as Num,
date($(MinDate) + rowno() -1 ) as TempDate
AUTOGENERATE $(MaxDate) - $(MinDate)+1;
//OrderDate Calendar
Calendar:
LOAD
TempDate as "Date",
// TempDate as Date_Applied,
// Week(TempDate) AS OrderWeek,
Year(TempDate) as "Year",
Num(Month(TempDate)) as "Month",
// Month(TempDate)&'.'&Year(TempDate) as MonthYear,
Year(TempDate)&'-'&num(Month(TempDate),00) as YearMonth,
num(Year(TempDate)&num(Month(TempDate),00)) as YearMonth2,
Day(TempDate) as "Day"
Resident temp_DateField
ORDER BY TempDate ASC;
DROP TABLE temp_DateField;