WEEK() calculates the week number of the year for a given date. The function returns an integer between 1 and 52 (or 53 in some years), representing which week of the year contains the specified date. If a null date is provided, WEEK() returns zero. This function is useful for date-based analysis, reporting, and scheduling.
WEEK(date)
WEEK() returns an integer
// Basic week calculation
WEEK(DATE("07/04/2007")) = 27
// End of year week
WEEK(DATE(2007, 12, 25)) = 52
// Additional examples
WEEK(DATE(2024, 1, 1)) = 1 // First week of year
WEEK(DATE(2024, 12, 31)) = 53 // Last week of year
WEEK(DATE(2024, 6, 15)) = 24 // Middle of year
WEEK(NULL) = 0 // Null date handling