Skip to content

Day - Built-in Date & Time Function

Purpose

Day returns the day from a datetime expression.

Syntax

Day(datetime)

Arguments

Argument Required Description
datetime Yes Any valid datetime expression from which the day will be returned

Returns

Integer

See also

Example

// returns the day of the month of the orderdate
Return Day({OrderHea.Order_Date})

Notes

  • When datetime cannot be converted to a datetime value, a runtime error is generated.
  • When datetime is passed as a string, your PC's regional settings are used for the conversion to datetime. If that fails, you get a runtime error.
  • When the datetime value is 0 or empty, the function returns 30 as the default COM date is December 30, 1899.