When performing calculations in an Excel spreadsheet, dates are implicitly understood and stored as serial numbers. By default, January 1, 1900, is represented by the serial number 1, and subsequent dates are counted sequentially. So how do you know these serial numbers? The DATEVALUE function will help you do that because it converts date formats into numbers. Below is the syntax and usage of the DATEVALUE function.
DATEVALUE Function and Examples
GUIDE TO USING DATEVALUE FUNCTION IN EXCEL - ILLUSTRATIVE EXAMPLES
Syntax: DATEVALUE(Date_text).
Where:
Date_text: Date written as text or referencing the cell containing that text.
Date_text is a required argument and only the year part of the argument can be omitted. That means if only the day and month are entered, the DATEVALUE function will default to the current year.
Illustrative Example: Convert the following dates from text format to serial numbers for ease of calculation:
Consider the following spreadsheet:
When entering dates directly as text into the DATEVALUE function:
To convert the birthdate into serial number format
Here, to convert the birthdate of cell D6, we use the formula E5:=DATEVALUE('05/15/1987')
- Note
- Setting the date in the system affects your results
Using the DATEVALUE function helps you convert date data into numerical format for easier spreadsheet calculations. You can combine this function with other Excel functions for more flexible use with date data.
Formatting dates in Excel helps you record date data more accurately. Many people encounter errors when listing date information in spreadsheets without knowing how to handle it. Mytour has shared a detailed solution for formatting dates in Excel, invite you to check it out.