Firebird Documentation Index → Firebird 2.1 Language Ref. Update → External functions (UDFs) → 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
.
Firebird Documentation Index → Firebird 2.1 Language Ref. Update → External functions (UDFs) → addWeek |