MicroStrategy ONE
WeekStartDate
Returns the date of the first day of the week in which a date or timestamp occurs.
Syntax
WeekStartDate<
firstDay
>(
Date
/
Time
)
Where:
Date
/
Time
is the input date or timestamp.firstDay
(default value is 1) is a parameter that determines which day of the week is considered as the first day of the week. You can type an integer value from 1 to 7, with 1 representing Sunday, 2 representing Monday, and so on until 7 representing Saturday.
For information on whether your database supports various date and time functions, see MicroStrategy and Database Support for Functions.
Example
Consider a report or dashboard that includes a Day attribute with a single ID form. You can create an attribute form with the following definition:
WeekStartDate<firstDay=1>(Day)
For each element of the Day attribute, the new attribute form displays the start date of the week.