Weekday Procedure

Version 7

Returns the current or specified date/time weekday (1=Sunday, 7=Saturday).

Syntax

[ lWeekday = ] Weekday ( [ dt ] )

The Weekday procedure syntax has the following parts:

Name

Type

Description

lWeekday

Long

Return value: weekday between 1 and 7, where 1=Sunday, 2=Monday, and so on.

dt

[Val] DateTime

Date time if given

Comments

If date time is not specified, current date time is used. 

Example

 

print Weekday()   ! prints current weekday "5"(Thursday)

print Weekday(dt) ! prints weekday of "dt"

See Also

Day, Month, Year, Hour, Minute, Second, DateTime Data Type