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, 2005")

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)