
Extracts the day (dd) from a date (mm/dd/yyyy) as a number.
Date format depends on the language you set in your browser settings. The DAY function always extracts the day from a date, regardless of format.
Syntax
DAY(x)
where:
- x: Date to evaluate
Format
Input Format | Output Format |
---|---|
x: Date | Number |
Arguments
The DAY function uses the following argument:
- x: Date: Date-formatted line item.
Constraints
The DAY function can only be used with date-formatted line items, not time periods.
Excel equivalent
Example
The source line item, Product sales start date, is date-formatted, and the target line item, Sales start date - Day, is number-formatted. The browser is set to US locale, so the date displays in mm/dd/yyyy format.
The Sales start date - Day line item contains this formula:
DAY(Product sales start date)
This formula extracts the date from the Product sales start date line item for each of the four products in the Fruit products list, with the following results:
List item | Product sales start date | Formula result |
Apples | 05/24/2020 | 24 |
Peaches | 06/07/2020 | 7 |
Bananas | 11/17/2020 | 17 |
Pears | 08/22/2020 | 22 |