DATEVALUE


returns the date-time serial number, from a date given as text.

Syntax:

DATEVALUE(datetext)

datetext is a date, expressed as text. DATEVALUE returns the date-time serial number, which may be formatted to read as a date.

Example:

DATEVALUE("2021-12-15")

returns 44545, the date-time serial number for 15 Dec 2021 (assuming the default date-time starting date)

Application:

Imagine you are a small business owner and you've exported a list of customer orders from your e-commerce platform. The "Order Date" column has been exported as text, and you want to calculate the number of days between the order date and the shipping date.


Problem: The "Order Date" column is stored as text, so you can't perform simple subtraction to find the difference between two dates.


Solution: Use the DATEVALUE function to convert the text dates into serial numbers.


Table:

Order ID

Order Date (Text)

Shipping Date

Order Date (Serial)

1001
1-Jan-2025
1/5/2025
45658
1002
15-Jan-2025
1/18/2025
45672
1003
28-Jan-2025
2/1/2025
45685

For the first row, the formula would be:

DATEVALUE("1-Jan-2025")


This formula would convert the text string "1-Jan-2025" into its corresponding serial number, which is 45658.





This page is protected by Google reCAPTCHA. Privacy - Terms.
 
Built using Zapof