Integer  IsNull

Chapter 2: DataWindow Expression Functions

IsDate

Description

Tests whether a string value is a valid date.

Syntax

IsDate ( datevalue )

Argument

Description

datevalue

A string whose value you want to test to determine whether it is a valid date

Returns

Boolean. Returns TRUE if datevalue is a valid date and FALSE if it is not.

Examples

Example 1

This expression returns TRUE:

IsDate("Jan 1, 99")

Example 2

This expression returns FALSE:

IsDate("Jan 32, 1999")

Example 3

This expression for a computed field returns a day number or 0. If the date_received column contains a valid date, the expression returns the number of the day in date_received in the computed field , and otherwise returns 0:

If(IsDate(String(date_received)),
DayNumber(date_received), 0)

See also





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

View this book as PDF