WeekDay Function

Returns a number between 1 and 7 representing the day of the week for a specified date parameter.

WeekDay (Date)

Parameters

Date  -  (Input, expression, Required)

The date value to extract the year from. If date is specified as a string expression, Newlook will convert it to a date as long as it contains a date in the form “mmm d, yyyy” (e.g. “Feb 1, 1999”).  

Return Value

An integer represented by one of the following constants, or Error if date is not a valid date.

Examples

WeekDay (“1 Feb 99”)

Returns 2 (DayMonday)

WeekDay (“29 Feb 99”)

Returns Error

WeekDay (Now ())

Returns the current day of the week

WeekDay (Null)

Returns Error

WeekDay (Error)

Returns Error

TIP:

Functions are specifically for use in the Macro Editor. Refer to Microsoft's official VB and JScript documentation for scripting equivalents.

See Also

Date function | DateAdd function | DateDiff function | Day function | Hour function | Minute function | Month function | Now function | Second function | Time function | Week function | WeekDay function | Year function


© 2004-2021 looksoftware. All rights reserved.