Day Function

Returns a number between 1 and 31 representing the day of the month of the specified date parameter.

Day (date)

Parameters

Date  -  (Input, expression, Required)

The date value to extract the day of the month from.

If date is specified as a string expression, Newlook will convert it to a date as long as it contains a date in a recognizable date format (e.g. "Feb 1, 1999" or "31/10/2007").

If date is specified as an integer value, Newlook will assume it is a serial number date, where the number equates to the number of days after December 31, 1899 (for example, April 1, 1962 is serial number 22737 because it is 22,737 days after December 31, 1899).

Return Value

An integer between 1 and 31, or Error (if date is not a valid date).

Examples

Day ("12 Jun 03")

Returns 12

Day ("1 Feb 99")

Returns 1

Day ("31/10/2005")

Returns 31

Day ("10-20-2015")

Returns 20

Day ("29 Feb 99")

Returns Error

Day (Now ())

Returns the day component of the current date

Day (Null)

Returns Error

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