Using Date Functions

Defining conditions on date fields to evaluate specific properties of a date.

You can define conditions on date fields that evaluate specific properties of a date, like the weekday. To do this, follow the steps below:

  1. Select a field from the list
  2. Enter the desired function in the func: field.
  3. Click (Add).
  4. Select an operator.
  5. Enter the desired value in the field after the operator.
  6. Click (Add).

The following date functions are available when defining filter criteria in CRM.Designer:

  • Day: Returns the day of the date (1…31)
  • Month: the month of the date (1…12)
  • Year: the year of the date
  • Quarter: the number of the quarter the date is in (1…4)
  • Week: the number of the date’s calendar week (1…53)
  • Weekday: the weekday of the date represented by a number (1=Monday, …, 7=Sunday)
  • Weekend: 1 if the date is on a weekend (i.e. Saturday or Sunday), otherwise 0
Note: Date functions cannot be used in conjunction with variable expressions like $curDay, $curMonth, etc. However, a filter to check e.g. if the month of a date field is equal to the current month can easily be realized using $????##?? as the comparison value (for the operators "=" and "<>" only). For further details, see Using Wildcards in Date Fields.