---
title: "DATEVALUE function in Excel: syntax and examples | PracticeExcel"
description: "How to use DATEVALUE in Excel and Google Sheets: turn dates stored as text into real dates you can sort, filter and count with."
canonical_url: "https://practiceexcelonline.com/functions/datevalue"
locale: en
meta:
  "og:description": "How to use DATEVALUE in Excel and Google Sheets: turn dates stored as text into real dates you can sort, filter and count with."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~REFURVZBTFVFIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBEQVRFVkFMVUUgaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IHR1cm4gZGF0ZXMgc3RvcmVkIGFzIHRleHQgaW50byByZWFsIGRhdGVzIHlvdSBjYW4gc29ydCwgZmlsdGVyIGFuZCBjb3VudCB3aXRoLg%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_DATEVALUE(date__text)%2Cp_Ii9mdW5jdGlvbnMvZGF0ZXZhbHVlIg%2Cs_0nuGXvUQwacPK0GD.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "DATEVALUE function in Excel: syntax and examples | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~REFURVZBTFVFIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBEQVRFVkFMVUUgaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IHR1cm4gZGF0ZXMgc3RvcmVkIGFzIHRleHQgaW50byByZWFsIGRhdGVzIHlvdSBjYW4gc29ydCwgZmlsdGVyIGFuZCBjb3VudCB3aXRoLg%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_DATEVALUE(date__text)%2Cp_Ii9mdW5jdGlvbnMvZGF0ZXZhbHVlIg%2Cs_0nuGXvUQwacPK0GD.png"
---

> Index of every page on this site: [llms.txt](https://practiceexcelonline.com/llms.txt)

# **The DATEVALUE function**

Converts a date written as text, such as "2024-03-15", into a date serial number Excel can calculate with and format.

=

DATEVALUE(

## **Syntax**

```
DATEVALUE(date_text)
```

<dl><dt>**date_text **</dt>
<dd>A date as text, in a format your Excel reads as a date, or a cell that holds one.</dd></dl>

## **Examples**

B1=DATEVALUE("2024-03-15")

|  | A | B |
| --- | --- | --- |
| 1 |  | **45366** |

B1=DATEVALUE("2024-03-15")-DATEVALUE("2024-01-01")

|  | A | B |
| --- | --- | --- |
| 1 |  | **74** |

B1=TEXT(DATEVALUE("March 15, 2024"),"yyyy-mm-dd")

|  | A | B |
| --- | --- | --- |
| 1 |  | **2024-03-15** |

## **Questions**

<details>

<summary>

### Why does DATEVALUE return

</summary>

Excel does not recognize the text as a date. Dates in a format from another country, such as 15/03/2024 on a US computer, are the usual cause. Rebuild them with DATE, LEFT, MID and RIGHT.

</details>

<details>

<summary>

### Why is the result a number like 45366?

</summary>

That is how Excel stores dates, counting days from Jan 1, 1900. Format the cell as a date to see Mar 15, 2024.

</details>

## **Related functions**

- [**DATE**](https://practiceexcelonline.com/functions/date)
- [**VALUE**](https://practiceexcelonline.com/functions/value)
- [**TEXT**](https://practiceexcelonline.com/functions/text)
- [**DAYS**](https://practiceexcelonline.com/functions/days)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://practiceexcelonline.com/#identity","@type":"Organization","name":"PracticeExcel","url":"https://practiceexcelonline.com/","logo":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/#website","@type":"WebSite","inLanguage":"en-US","name":"PracticeExcel","url":"https://practiceexcelonline.com/","alternateName":["Practice Excel Online","PracticeExcelOnline.com"],"publisher":{"@id":"https://practiceexcelonline.com/#identity"},"workTranslation":{"@id":"https://excelopgaver.dk/#website"}},{"@id":"https://practiceexcelonline.com/functions/datevalue#webpage","description":"How to use DATEVALUE in Excel and Google Sheets: turn dates stored as text into real dates you can sort, filter and count with.","name":"DATEVALUE function in Excel: syntax and examples","url":"https://practiceexcelonline.com/functions/datevalue","@type":["WebPage","FAQPage"],"breadcrumb":{"@id":"https://practiceexcelonline.com/functions/datevalue#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"mainEntity":[{"@id":"https://practiceexcelonline.com/functions/datevalue#/schema/question/1"},{"@id":"https://practiceexcelonline.com/functions/datevalue#/schema/question/2"}],"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/functions/datevalue"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/functions/datevalue#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Excel functions","item":"https://practiceexcelonline.com/functions","position":2},{"@type":"ListItem","name":"DATEVALUE function in Excel: syntax and examples","position":3}]},{"@id":"https://practiceexcelonline.com/functions/datevalue#article","description":"How to use DATEVALUE in Excel and Google Sheets: turn dates stored as text into real dates you can sort, filter and count with.","headline":"DATEVALUE function in Excel: syntax and examples","inLanguage":"en-US","thumbnailUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~REFURVZBTFVFIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBEQVRFVkFMVUUgaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IHR1cm4gZGF0ZXMgc3RvcmVkIGFzIHRleHQgaW50byByZWFsIGRhdGVzIHlvdSBjYW4gc29ydCwgZmlsdGVyIGFuZCBjb3VudCB3aXRoLg%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_DATEVALUE(date__text)%2Cp_Ii9mdW5jdGlvbnMvZGF0ZXZhbHVlIg%2Cs_0nuGXvUQwacPK0GD.png","@type":["Article","TechArticle"],"author":{"@id":"https://practiceexcelonline.com/#identity"},"image":{"@id":"https://practiceexcelonline.com/#/schema/image/1"},"isPartOf":{"@id":"https://practiceexcelonline.com/functions/datevalue#webpage"},"mainEntityOfPage":{"@id":"https://practiceexcelonline.com/functions/datevalue#webpage"},"publisher":{"@id":"https://practiceexcelonline.com/#identity"}},{"@id":"https://practiceexcelonline.com/functions/datevalue#/schema/question/1","@type":"Question","inLanguage":"en-US","name":"Why does DATEVALUE return","acceptedAnswer":{"@type":"Answer","text":"Excel does not recognize the text as a date. Dates in a format from another country, such as 15/03/2024 on a US computer, are the usual cause. Rebuild them with DATE, LEFT, MID and RIGHT."}},{"@id":"https://practiceexcelonline.com/functions/datevalue#/schema/question/2","@type":"Question","inLanguage":"en-US","name":"Why is the result a number like 45366?","acceptedAnswer":{"@type":"Answer","text":"That is how Excel stores dates, counting days from Jan 1, 1900. Format the cell as a date to see Mar 15, 2024."}},{"@id":"https://practiceexcelonline.com/#logo","@type":"ImageObject","caption":"PracticeExcel","contentUrl":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png"},{"@id":"https://practiceexcelonline.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~REFURVZBTFVFIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBEQVRFVkFMVUUgaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IHR1cm4gZGF0ZXMgc3RvcmVkIGFzIHRleHQgaW50byByZWFsIGRhdGVzIHlvdSBjYW4gc29ydCwgZmlsdGVyIGFuZCBjb3VudCB3aXRoLg%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_DATEVALUE(date__text)%2Cp_Ii9mdW5jdGlvbnMvZGF0ZXZhbHVlIg%2Cs_0nuGXvUQwacPK0GD.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~REFURVZBTFVFIGZ1bmN0aW9uIGluIEV4Y2VsOiBzeW50YXggYW5kIGV4YW1wbGVz%2Cdescription_~SG93IHRvIHVzZSBEQVRFVkFMVUUgaW4gRXhjZWwgYW5kIEdvb2dsZSBTaGVldHM6IHR1cm4gZGF0ZXMgc3RvcmVkIGFzIHRleHQgaW50byByZWFsIGRhdGVzIHlvdSBjYW4gc29ydCwgZmlsdGVyIGFuZCBjb3VudCB3aXRoLg%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_DATEVALUE(date__text)%2Cp_Ii9mdW5jdGlvbnMvZGF0ZXZhbHVlIg%2Cs_0nuGXvUQwacPK0GD.png"}]}
```

## Sitemap

See the full [sitemap](https://practiceexcelonline.com/sitemap.md) for all pages.
