DATEVALUE Function in Google Sheets: Explained
In this article, you will learn what the DATEVALUE function is and how to use it in Google Sheets.
What does the DATEVALUE function do?
The DATEVALUE function works as a converter from a date to a serial number. The serial number 1 is given to 12/31/1899. You can use the serial number as a value in the formula or calculation.
How to use the DATEVALUE formula in Google Sheets
- Type “=DATEVALUE” or go to “Insert” → “Function” (or directly navigate to the “Functions” icon) → “Date” → “DATEVALUE”.
- Input a date you need to convert to a numeric value (serial number) by cell reference or manual input.
- Press the “Enter” key.
When you input a date in the formula, by cell reference or manual input, you need to be careful about the formatting. The formatting of the date should be the one Google Sheets can recognize. If you don’t have any customized formatting, use standard format or one of the types listed in “Custome date and time”. Look at the following screenshot. The rows highlighted in red are examples where the function doesn’t work properly because of their inputs’ formatting. Note that serial number 1 is given to “12/31/1899”, as you can see in the picture.
How do I calculate the number of days between two dates in Google Sheets?
You can use the DAYS function to compute the number of days between two specific dates.
Can you automatically populate dates in Google Sheets?
You can use the TODAY or NOW functions to get the current date in Google Sheets. The TODAY formula shows the year, month, and date on that day, and the NOW function offers time (hour, minute, and second) in addition to what the TODAY formula shows. Their common feature is the values they return are automatically updated whenever you open or refresh the sheet.