Real  RelativeTime

Chapter 2: DataWindow Expression Functions

RelativeDate

Description

Obtains the date that occurs a specified number of days after or before another date.

Syntax

RelativeDate ( date, n )

Argument

Description

date

A date value

n

An integer indicating the number of days

Returns

Date. Returns the date that occurs n days after date if n is greater than 0. Returns the date that occurs n days before date if n is less than 0.

Examples

Example 1

This expression returns 1999-02-10:

RelativeDate(1999-01-31, 10)

Example 2

This expression returns 1999-01-21:

RelativeDate(1999-01-31, -10)

See also





Copyright © 2004. Sybase Inc. All rights reserved. RelativeTime

View this book as PDF