Specifications

CHAPTER 24 DataWindow Expression and InfoMaker Functions
Users Guide 675
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 users machine, then
on that machine the name returned by
DayName will be in the language of the
localized files.
Examples 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")
To pass this validation rule, the day in date_signed must not be Sunday:
DayName(date_signed) <> "Sunday"
See also
Date
Day
DayNumber
IsDate
DayNumber
Description Gets the day of the week of a date value and returns the number of the weekday.
Syntax DayNumber ( date )
Return value Integer. Returns an integer (1–7) representing the day of the week of date.
Sunday is day 1, Monday is day 2, and so on.
Examples This expression for a computed field returns Wrong Day if the date in
start_date is not a Sunday or a Monday:
If(DayNumber(start_date) > 2, "Okay", "Wrong Day")
This expression for a computed field returns Wrong Day if the date in end_date
is not a Saturday or a Sunday:
If(DayNumber(end_date) > 1 and DayNumber(end_date)
< 7, "Okay", "Wrong Day")
This validation rule for the column end_date ensures that the day is not a
Saturday or Sunday:
DayNumber(end_date) >1 and DayNumber(end_date) < 7
Argument Description
date The date from which you want the number of the day of the week