$return = WeekdayName(weekday[,abbreviate[,firstdayofweek]])
$return = WeekdayName(date[,abbreviate][,date_format])
Where:
$return |
The weekday name of the specified day the week. (For example, Sunday) |
weekday |
The number of the the day of the week. See the Weekday script command. |
date |
The input date, |
abbreviate |
Specify "true" to return an abbreviated weekday name. Specify "false" to return the full weekday name. ("false" is the default) |
firstdayofweek |
A number from 0 to 7 that specifies the day to use as the first day of the week. 0 for the first day of the week as defined by the systems settings. 3 for Tuesday 4 for Wednesday 5 for Thursday 6 for Friday 7 for Saturday |
date_format |
can be one of the following: DMY (date is in DD/MM/YYYY format.) MDY (date is in MM/DD/YYYY format.) YMD (date is in YYYY/MM/DD or YYYY-MM-DD format.)
date_format may be omitted, in which case the date format is taken from the "Option DateFormat" command. If the "Option DateFormat" command is also omitted, then the date format is assumed to be the system short date format. |
weekday, date, firstdayofweek and/or date_format may be variables.
The WeekdayName command returns the weekday name for the specified day of the week.
Examples
$weekday = WeekdayName($DATE) |
'Returns today's weekday name in system short date format. |
$weekday = WeekdayName(1) |
'Returns Sunday |
$weekday = WeekdayName(1, TRUE) |
'Returns Sun |
$weekday = WeekdayName(1, false, 2) |
'Returns Monday |
$weekday = WeekdayName("2015-01-01",false,ymd) |
'Returns Thursday |
$weekday = WeekdayName("2015-01-02",true,YMD) |
'Returns Fri |
Sample Script
' Weekday - Display the day of the week.
MsgBox("Today is = " & WeekdayName($DATE))
exit
See Also:
TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.