webCOMAND

DAY()

Return the day part of a date or timestamp as an integer from 1-31.

Prototype

integer DAY(timestamp $timestamp)

Parameters

  • timestamp - A date ("YYYY-MM-DD") or timestamp ("YYYY-MM-DD HH:MM:SS").

Return

The day portion of a date or timestamp, or NULL if there is an error, such as an invalid timestamp.

Example

SELECT OID, DAY(META(LastModified)) AS DayModified FROM User

See Also

DAYOFMONTH(), DAYOFYEAR(), WEEKDAY(), WEEK(), MONTH(), YEAR()