- ⌂ Date & Time
- Functions
WEEK()
Return the week number represented by a date or timestamp, in the range of 1 to 52.
Prototype
integer WEEK(mixed $timestamp)
Parameters
- timestamp - A date ("YYYY-MM-DD") or timestamp ("YYYY-MM-DD HH:MM:SS").
Return
The week number represented by a date or timestamp, or NULL if there is an error, such as an invalid timestamp.
Example
SELECT OID, WEEK(META(LastModified)) AS WeekModified FROM User
See Also
DAYOFMONTH(), DAYOFYEAR(), WEEKDAY()