DAY

DAY takes a date object or a function such as NOW and returns an integer representing the day of the month on which it falls. Use the coerce-to-string function to convert the result to a string. The structure of the date response returned follows the ISO 8601 standard.

+ / - operations can be used with the DAY function, such as DAY() - 10 or DAY() + 6.

Function category: Date

Syntax

DAY(arg1)

Arguments

Description

arg1

Date object or a function that resolves to a day object.

Example 1

Enter the following into the Formula editor to return the day using a NOW function. This returns the current day.

# Find the current day
DAY(NOW())
# This function returns
18
# if the current day is the 18th of the month

Example 2

Enter the following into the Formula editor to return a string using the DAY function wrapped in the coerce-to-string function and having the NOW function as the argument.

# Find the current day and return a string
coerce.to-string(DAY(NOW()))
# This function returns the string
"18"
# if the current day is the 18th of the month