Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
day = %WKDAY([date])
xcall WKDAY(day[, date])
One of the following values that represents the weekday: (n)
1 = Sunday
2 = Monday
3 = Tuesday
4 = Wednesday
5 = Thursday
6 = Friday
7 = Saturday
(optional) The date for which you want to determine the day of the week. This argument may be specified as either a numeric date or an alphabetic date. The default is the current date. (a or n)
%WKDAY returns a numeric value that identifies the day of the week either for the current day or for the date passed.
If date is passed as a numeric value, the format must be YYYYMMDD. If the date is passed as an alpha value, the format can be
The hyphen delimiters in the first format are optional, but they must be specified if leading components are omitted. Any omitted component defaults to the current value.
The second format indicates plus or minus n days from the current date (for example, +5 or -10).
See %JPERIOD for examples of valid dates.
If an invalid date is passed, an “Invalid date” error ($ERR_INVDATE) is generated.
.define TTCHN ,1 record today ,d1 day ,7a9, "Sunday", "Monday", "Tuesday", "Wednesday", & "Thursday", "Friday", "Saturday" proc open(TTCHN, o, "tt:") xcall wkday(today) ;Get day writes(TTCHN, "Today is" + day(today)) ;Display it close TTCHN xreturn end