Description
Gets the day of the week in a date (or datetime) value and returns the weekday's name.
Syntax
DayName ( date | datetime )
Return value
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 section called “Internationalizing an Application” in Application Techniques.
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 of today must not be Sunday:
DayName(datetime(today(),now())) <> "Sunday"
Or
DayName(today()) <> "Sunday" //today returns datetime if it is a DataWindow function
See also
DayName in the section called “DayName” in PowerScript Reference