<< Click to Display Table of Contents >> Navigation: Available Functions > CDOW() |
Syntax
CDOW( <DateValue> )
Purpose
To determine the Day Of Week for a given date value.
Parameters
<DateValue> may be the name of a date field (such as the .Donation_Date. field), but it may also be any value of Date type -- such as the current date returned by the "Date()" function.
Returns
CDOW() returns the name of the day of the week as a character value. The first letter is upper case and the rest of the value is lower case.
Usage
CDOW() can be used to print the day of week for dates in reports. This information may also be useful if you wish to define a selection condition based on what day of the week a donor made a donation, or perhaps what day of the week the history of a donor was last altered.
Example
The following examples illustrate CDOW():
CALL |
RESULT |
---|---|
DATE() |
10/01/2011 |
CDOW( DATE() ) |
Saturday |
CDOW( DATE() + 7 ) |
Saturday |
CDOW( CTOD( "06/14/2011" ) ) |
Tuesday |
In defining a report, perhaps you wish the day of the week each donation was made to appear next to the calendar date. To derive the day of the week for each donation, you could use the following expression in the Report Writer:
CDOW( .Donation_Date. )