Day

Description

Obtains the day of the month in a date (or datetime) value.

Syntax

Day ( date | datetime )

Argument

Description

date or datetime

The date or datetime for which you want the day


Return value

Integer. Returns an integer (1-31) representing the day of the month in date.

Examples

This expression returns 31:

Day(2020-01-31)

This expression returns the day of the month in the start_date column:

Day(start_date)

The following expressions return the day of the month for today:

Day(today())
Day(datetime(today(),now()))

See also

Date

IsDate

Month

Year

Day in the section called “Day” in PowerScript Reference