DAY(date)

Returns the day from a given date (Integer).


dateThe date you want the day from (Date).

REMARKS
* The "date" can be any date, text string, numerical expression or any combination.
* If "date" is Null, then Null is returned.
* You can use the DATE function to return the current system date.
* You can use the MONTH function to return the month from a given date.
* You can use the YEAR function to return the year from a given date.
* The equivalent .NET function is Microsoft.VisualBasic.DateAndTime.Day
* For the Microsoft documentation refer to docs.microsoft.com

Debug.Print Now()                     '= 01/09/2021 23:56:17  
Debug.Print Day(Now()) '= 12
Debug.Print Day("04/07/2003") '= 4
Debug.Print Day(35678) '= 5
Debug.Print Day("15 February 2006") '= 15

© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited Top