Use this function to enter the name of the day of the week.
Parameter |
Description |
DayOfWeek |
Enter an integer to designate the day of the week. 1 - Sunday The default is the current day of the week. |
Locale |
(Optional) Enter the locale code. If you omit this parameter, the system checks the Locale INI option. If the Locale INI option offers no value, the system defaults to USD (United States/English). |
This function is typically used with the WeekDay function. The WeekDay function determines the day of the week number from a given date.
Here are some examples:
(Assume the current date is Saturday, January 3, 2009.)
Function |
Result |
Explanation |
Return(DayName( )) |
Saturday |
Defaults to the current day of the week and returns Saturday. |
DayName(WeekDay ("09/33", "I")) |
Monday |
First the WeekDay function determines the day of the week number for the given date and format. DayName then uses this number to return the correct day name: Monday. |
DayName (WeekDay( DateAdd(,,-1))) |
Friday |
First the DateAdd function uses the current date and subtracts one day. WeekDay then determines the number for the day of the week. DayName then determines that the given date is Friday, January 2, 2009 and returns the day name: Friday. |
Return(DayName (,"ZAA")) |
Saterdag |
It returns the name of the current day of the week based and translates that name into Afrikaans. |
© Copyright 2014, Oracle and/or its affiliates. All rights reserved. Legal notices.