Week Function

Returns a number between 1 and 52 representing the week of the year for a specified date parameter.

Week (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 between 1 and 52, or Error if date is not a valid date.

Examples

Week (“1 Feb 99”)

Returns 5

Week (“29 Feb 99”)

Returns Error

Week (Now ())

Returns the current day of the week

Week (Null)

Returns Error

Week (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.