VBA - Get Today's Date (Current Date) …
https://www.automateexcel.com/vba/todays-current-date/
There are a couple of ways to obtain today’s date in VBA code, namely using the VBA Date() function or the VBA Now() functions. Date() function. The Date() Function returns today’s date. In the example below, we assign today’s date to a variable and then display the date in the immediate window in the VBE Editor. Dim dtToday as Date dtToday = Date() Debug.Print dtToday. Alternatively, we can display the date in a message box. Date(): This function returns today's date as a date value. For example, Date() will return 12/15/2020 if today is December 15, 2020. Now(): This function returns the current date and time as a date value. For example, Now() will return 12/15/2020 10:23:45 AM if today is December 15, 2020 and the current time is 10:23:45 AM. DateAdd(): This function returns a date value that is a specified number of intervals away from a given date. For example, DateAdd("d", 0, Date) will return the same value as Date(), but you can also use it to get the date of tomorrow or yesterday by changing the number of intervals.
Date(): This function returns today's date as a date value. For example, Date() will return 12/15/2020 if today is December 15, 2020.
Now(): This function returns the current date and time as a date value. For example, Now() will return 12/15/2020 10:23:45 AM if today is December 15, 2020 and the current time is 10:23:45 AM.
DateAdd(): This function returns a date value that is a specified number of intervals away from a given date. For example, DateAdd("d", 0, Date) will return the same value as Date(), but you can also use it to get the date of tomorrow or yesterday by changing the number of intervals.
DA: 97 PA: 35 MOZ Rank: 51