Using [Today] and [Me] in SharePoint calculated columns
Posted by onlydarksets on March 20, 2008
Once again, I have nothing to add to this great tip:
- First, create a new column in your list with the column name of “Today”.
Click “OK”. (It doesn’t matter what type of column or data it is, this is
just a place holder and will be removed later).
MK Note: Create column called Today… I also created a column called DOB (date field) where I will enter the birth date.
- Next, create a column with the data where you would like to use “Today” as a
reference to today’s date. The column type should be “Calculated”. In the
formula field, create your formula using “Today” as if it held the column date/time.
SharePoint will calculate the formula based on the assumption that you will
be using “Today” as a reference to the new column you just created.
MK Note: I created a column called MonthCheck with the formula shown below:
- Next, edit the new column named “Today” that you created in the first step.
On the very bottom of the page, click “Delete”, to delete the column. In
your formula, SharePoint will keep the reference to “Today” but it will
change from referencing your column, to a reference to the current date.
- MK Note: Now you can create your new view in the list to display “This Month’s Birthdays“. Just apply a filter to Show only when the following is true: MonthCheck is equal to Birthday
I’ve also created a BirthDay Column (Capitalized the “D“ to note the difference) as well that is a calculated column: =DATE(YEAR(Today),MONTH(DOB),DAY(DOB))
You can then create a view to display Today’s Birthdays by filtering to Show only when the following is true: BirthDay is equal to [Today]