Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i need to create calndar....
can any one help me to cretae...
Thanks in advance!!!!!
Smiley
if your problem resolved then mark it as either helpful or correct answer so that it might be helpful for other developer
try this code
// Calender
LET vDateMin = Num(MakeDate(2008,1,1));
LET vDateMax = Floor(monthEnd(Today()));
LET vDateToday = Num(Today());
TempCalendar:
LOAD
$(vDateMin) + RowNo() - 1 AS DateNumber,
Date($(vDateMin) + RowNo() - 1) AS TempDate
AUTOGENERATE 1
WHILE $(vDateMin)+IterNo()-1<= $(vDateMax);
Calendar:
LOAD Distinct
Date(TempDate,'DD-MM-YYYY' ) AS CalendarDate,
// Standard Date Objects
Day(TempDate) AS CalendarDayOfMonth,
WeekDay(TempDate) AS CalendarDayName,
Week(TempDate) AS CalendarWeekOfYear,
Month(TempDate) AS CalendarMonthName,
num(Month(TempDate)) AS CalendarMonthNo,
Week(TempDate) &' '&Month(TempDate) AS weekmonth,
'Q' & Ceil(Month(TempDate)/3) AS CalendarQuarter,
Year(TempDate) AS CalendarYear,
// Calendar Date Names
WeekName(TempDate) as CalendarWeekNumberAndYear,
MonthName(TempDate) as CalendarMonthAndYear,
QuarterName(TempDate) as CalendarQuarterMonthsAndYear,
// Start Dates
DayStart(TempDate) as CalendarDayStart,
MonthStart(TempDate) as CalendarMonthStart,
QuarterStart(TempDate) as CalendarQuarterStart,
YearStart(TempDate) as CalendarYearStart,
QuarterEnd(TempDate) as CalendarQuarterEnd,
YearEnd(TempDate) as CalendarYearEnd,
YearName(TempDate,0,4)as FiscalYear,
'Q' & Ceil(Month(TempDate)/3) & '/' & Year(TempDate) AS CalendarQuarterAndYear,
Year(TempDate) & '/' & 'Q' & Ceil(Month(TempDate)/3) AS CalendarYearAndQuarter,
RESIDENT TempCalendar
Where TempDate>01-01-2007 //ORDER BY TempDate ASC
;
//DROP TABLE TempCalendar;
if your problem resolved then mark it as either helpful or correct answer so that it might be helpful for other developer