|year||Integer expression for year.|
|month||Integer expression for month.|
|day||Integer expression for day of month.|
DateSerial(2012, 12, 31)
Following is an example of a calculated member in Time dimension Weekly hierarchy to get all full weeks from the last three months:
DateSerial(Year(Now()), Month(Now()) - 3,1)returns the first date of the month 3 months ago,
DateSerial(Year(Now()),Month(Now()),-6)returns 7 days before the end of the current month to exclude a week which starts at the end of the last month and ends in the current month; if all weeks which start in the last month despite their end dates should be included, then write 0 instead of -6 - it returns the last day of a previous month.