1. Calculation functions
  2. All Functions
  3. Time and Date Functions
  4. DAY

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)

A module with a list of fruits on columns, and line items about their sales on rows. The Sales start date - Day line item uses the DAY formula to extract the day from the date-formatted Product sales start date line item.

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

Similar functions