Purpose
Return value
Syntax
=NOW()
How to use
NOW takes no parameters but requires empty parentheses. The value returned by NOW will continually update each time the worksheet is updated, for example, each time a value is entered or changed. Use F9 to force the worksheet to recalculate and update the value.
The value returned by the NOW function is a standard Excel date, including a fractional value for time. To display the result as a date, apply a date number format. Optionally, customize the number format to include the time. If you want the current date without a time value, use the TODAY function.
The NOW function explained
The NOW function returns the current date and time according to the settings on your computer. As I write this, the date is June 22, 2024, and it's just after 10 AM in the morning. When I enter the formula below in cell A1, it returns the decimal number shown below:
=NOW() // returns 45465.42441
To see the number returned by NOW, apply the General number format (Control + ~).
The integer part of the number (45465) is the date (June 22, 2024), and the decimal part of the number (0.42441) is the time (about 10:11 AM). Note that you will need to apply a number format to display the date and/or time as required. After working for a few minutes in Excel, NOW returns a new result:
=NOW() // returns 45465.42721
Notice the number has increased slightly. The date (45465) is the same (June 22, 2024), but the time (0.42721) is now about 10:15 AM. The NOW function will continue to update this value each time the worksheet is changed, saved, or opened. To display the number returned by NOW as a date and/or time, you will need to apply a suitable number format. Here are three examples:
"d-mmm-yyyy" // a date like "22-Jun-2024"
"h:mm" // a time like "10:15"
"m/d/yyyy h:mm" // a date and time like "6/22/2024 10:15"
Note: the NOW function returns the current date and time. The similar TODAY function returns just the current date.
Example - basic usage
The examples below show how the NOW function can be used in various ways:
=NOW() // current date and time
=NOW()-7 // last week same time
=NOW()+7 // next week same time
=NOW()+90 // 90 days from now
=MROUND(NOW()+90,"1:00") // 90 days from now to nearest hour
=EDATE(NOW(),3) // 3 months from now, time removed
=EDATE(NOW(),12) // 12 months from now, time removed
=EOMONTH(NOW(),-1)+1 // first day of current month
=EDATE(NOW(),6)+MOD(NOW(),6) // 6 months from now, time preserved
Current time without a date
The NOW function returns the current date and time. However, in some cases, you may want to return only the current time. You can do this by adding the MOD function as shown below:
=MOD(NOW(),1)
The MOD function returns the remainder after division. The first argument is the number, and the second is the divisor. By using a divisor of 1, the remainder will be the decimal part of the number since every whole number can be evenly divided by itself.
Hours and minutes before a specific time
Why would you want to remove the date? One example is the problem of displaying the hours and minutes that remain before a specific time of the day. For example, the formula below will display the time that remains before 6:00 PM:
="18:00"-MOD(NOW(),1)
Without removing the date, the value from NOW would always be larger than the time "18:00" which would create a negative number. Excel does not support negative time values and will instead display a string of hash characters like "######". Of course, the result from the formula above will turn negative when the current time has passed 6:00 PM. To force negative values to zero, you can add the MAX function like this:
=MAX("18:00"-MOD(NOW(),1),0)
Here, the MAX function is a clever way to avoid an IF statement. If the time remaining is positive, MAX will return that value. If the time that remains is negative, MAX will return zero. To see hours and minutes, format the result with the number format like "h:mm".
Static date and time
If you need a static date and time that won't change, you can use the following shortcuts:
- Insert current date - Control + ;
- Insert current time - Control + Shift + :
To enter both values in a single cell, enter the date, a space, and then the time.
Formatting results
The result of NOW is a serial number representing an Excel date and time. You can format the value returned by TODAY using any standard date format. You can use the TEXT function to build a text message that includes the current date:
="The date is "&TEXT(NOW(),"mmm d")&" and the time is "&TEXT(NOW(),"h:mm AM/PM")
To return a text string like "The date is May 31 and the time is 6:10 PM".