webCOMAND

DAYOFYEAR()

Return the day of the year for a date or timestamp, in the range of 1 to 366.

Prototype

integer DAYOFYEAR(timestamp $timestamp)

Parameters

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

Return

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

Example

SELECT OID, YEAR(META(LastModified)) AS YearModified FROM User

See Also

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