Get the current date and time
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 ju
=NOW() // returns 45465.42441
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 th
=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
"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"
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
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 th
=MOD(NOW(),1)
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. F
="18:00"-MOD(NOW(),1)