nweekdate
(Not recommended; use dateshift) Date of specific occurrence
of weekday in month
nweekdate is not recommended because it returns a serial date
number. To return the specified occurrence of a weekday as a datetime
value, use the dateshift function. If you do use
nweekdate, consider setting the outputType
option to "datetime". For more information on updating your code, see
Version History or Replace Discouraged Instances of Serial Date Numbers and Date Strings.
Syntax
Description
returns the date for the Date = nweekdate(n,Weekday,Year,Month,NextDay,outputType)nth occurrence of
Weekday in the given year and month.
Weekday is an integer from 1 (Sunday)
through 7 (Saturday), and n is an integer from
1 through 5 that specifies the
nth occurrence. A nonzero value for
NextDay requires that the week also includes the specified
subsequent weekday. Setting outputType to
"datetime" is recommended.