ADD_WEEKS

Purpose

This function adds a specified number of weeks to a date or timestamp.

Syntax

add_weeks::=

Add Weeks

Usage Notes

  • ADD_WEEKS(x,n) is similar to ADD_DAYS(x,n*7).
  • Decimals are rounded before adding the number.
  • For data type TIMESTAMP WITH LOCAL TIME ZONE, this function is calculated within the session time zone.

Example

SELECT ADD_WEEKS(DATE '2000-02-29', 1) AW1,
       ADD_WEEKS(TIMESTAMP '2005-01-31 12:00:00', -1) AW2;
Result
AW1 AW2
2000-03-07 2005-01-24 12:00:00.000000