DAY
Use the DAY function to return the day-of-month from a Date or Date/Time. The day is given as a number ranging from 1 to 31.
Use
DAY( date )
Return the day of the month from a date as an integer between 1 and 31.
| Parameter | Required | Description |
|---|---|---|
| date | Yes | the date to extract the day of month from |
| Returns | Number |
Examples
Validation for Monthly Billing Deadlines
In an approval workflow for a "Monthly Service Log," you might want to ensure that a user only submits logs for the first day of the month to maintain accounting consistency. You would apply this as an Output Validation Formula on a "LogDate" field,.
- Formula:
DAY(this) = 1, - Logic: The keyword
thisrefers to the date currently being entered in the form. The DAY function extracts the day number from that date. If the user selects "01/12/2024," the function returns 1, making the formula TRUE (valid),. If they select any other day, it returns FALSE (invalid).
Input Mapping for Identity Verification
If a Teams Trigger form captures a user's date of birth, you may need to extract just the day portion to pass into a subsequent activity or to update a variable for record-keeping,.
- Formula:
DAY(@Trigger.out.DateOfBirth), - Logic: This formula uses Input Mapping to pull data from the trigger step,. If the date provided in the trigger is "27/02/1996," the function returns the number 27. This numerical value can then be displayed in a Content Block or used in other calculations, such as verifying a person's age or birthday,,.