Dayn

Dayndayn returns a number corresponding to the rank of the day in the week for the date given as an argument.

Syntax

 dayn(DATE_EXPRESSION)

Examples

 # Which day was the Bastille Day?TUESDAY=dayn([14/07/1789]) : # TUESDAY contains 2 because it was a Tuesday# Are we Saturday or Sunday todayIf find(dayn(date$),6,7)# We are Saturday or SundayElse# we are a week dayEndif

Description

dayn returns the rank of the day in a week from a valid date. The result is the following:

The result type is Integer.

Associated errors

ErrorDescription
10The argument is not a date.

See also

day, month$, month, year, day$, nday, date$, Date.