DAY() – Extracts the day from a date

The DAY() function returns the day of the month (an integer from 1 to 31) from a given date.

Syntax

DAY(date)

  • date: A valid date or a cell reference containing a date. This date can be entered as text (e.g., "15/01/2025", conforming to your MathGrid date settings) or be the result of another date function like TODAY().

Basic example

DAY(T1A1)

Extracts the day of the month from the date in cell T1A1.

Example outputs:

  • If T1A1 contains the date "15/01/2025": DAY(T1A1)15
  • If TODAY() returns "23/07/2024": DAY(TODAY())23
  • If cell T1B2 contains "05-12-2023" (and this matches your date format settings): DAY(T1B2)5

Key features

  • Numeric output: Always returns a number representing the day of the month.
  • Flexible input: Accepts dates as text strings (matching MathGrid's date format settings) or as outputs from other date functions.
  • Date part extraction: Specifically isolates the day component from a full date.

Practical uses

  • Analyzing data based on the day of the month (e.g., sales on the 15th of each month).
  • Conditional formatting based on the day (e.g., highlight weekends if combined with other logic).
  • Creating custom date strings where only the day is needed.
  • As an input for other calculations or functions that require just the day number.

Common mistakes

  • Incorrect date format: If providing a date as text, ensure it matches the date format specified in MathGrid's settings (e.g., "dd/mm/yyyy" vs "mm/dd/yyyy"). An incorrect format might lead to an error or an incorrect day being extracted.
  • Using non-date values: Providing a number or text that isn't a valid date will result in an error. For example, DAY("Hello") or DAY(2025) are invalid.
  • Expecting day of the week: DAY() returns the day of the month (1-31), not the day of the week (e.g., Monday, Tuesday).

Report issue

Features, Pricing, Documentation, Support, Login

MathGrid ©

Features,
Pricing,
Documentation,
Support,
Login

MathGrid ©

Back to top Arrow