Firebird Documentation IndexFirebird 2.1 Language Ref. UpdateExternal functions (UDFs) → addWeek
Firebird Home Firebird Home Prev: addSecondFirebird Documentation IndexUp: External functions (UDFs)Next: addYear

addWeek

Library: fbudf

Added in: 1.0 (Win), 1.5 (Linux)

Description: Returns the first argument with number weeks added. Use negative numbers to subtract.

Result type: TIMESTAMP

Syntax: 

addweek (atimestamp, number)

Declaration: 

DECLARE EXTERNAL FUNCTION addWeek
   TIMESTAMP, INT
   RETURNS TIMESTAMP
   ENTRY_POINT 'addWeek' MODULE_NAME 'fbudf'

The DATEADD alternative: The internal function DATEADD, which can replace all the other add<DateTimePart> functions, doesn't support WEEK yet. This will be realised in Firebird 2.5. Meanwhile, you can use DATEADD(7*number DAY TO atimestamp) – or stick with addWeek.

Prev: addSecondFirebird Documentation IndexUp: External functions (UDFs)Next: addYear
Firebird Documentation IndexFirebird 2.1 Language Ref. UpdateExternal functions (UDFs) → addWeek