DayName

Description

Gets the day of the week in a date value and returns the weekday’s name.

Syntax

DayName ( date )

Argument

Description

date

The date for which you want the name of the day

Returns

String. Returns a string whose value is the name of the weekday (Sunday, Monday, and so on) for date.

Usage

DayName returns a name in the language of the deployment files available on the machine where the application is run. If you have installed localized deployment files in the development environment or on a user’s machine, then on that machine the name returned by DayName will be in the language of the localized files.

For information about localized deployment files, see the chapter on internationalizing an application in Application Techniques.

Examples

Example 1

This expression for a computed field returns Okay if the day in date_signed is not Sunday:

If(DayName(date_signed) <> "Sunday", "Okay", "Invalid Date")

Example 2

To pass this validation rule, the day in date_signed must not be Sunday:

DayName(date_signed) <> "Sunday"

See also