{
  "category": "Date and time functions",
  "display_name": "DATEVALUE",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.DATEVALUE",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 10 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 10 recorded answers",
    "workbook_corpus": {
      "cells": 10,
      "matched": 10
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/dates.rs#L281-L287"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [
        "catalogue/text_format::read_value",
        "catalogue/text_format::profile",
        "catalogue/text_format::rendered",
        "catalogue/text_format::text",
        "decimal::low32",
        "decimal::Natural::zero",
        "decimal::Natural::from_u64",
        "decimal::Natural::pow10",
        "decimal::Natural::normalize",
        "decimal::Natural::is_zero",
        "decimal::Natural::mul_add_small",
        "decimal::Natural::times_pow10",
        "decimal::Natural::times_pow5",
        "decimal::Natural::times_pow2",
        "decimal::ExactDecimal::read",
        "decimal::ExactDecimal::binary",
        "format/datetime::has_invalid_exponent",
        "format/datetime::looks_like_datetime_format",
        "format/datetime::without_subseconds",
        "format/datetime::render_with_datetime_tokens",
        "format/datetime::tokenize_datetime_format",
        "format/datetime::elapsed_token_at",
        "format/datetime::classify_minute_tokens",
        "format/datetime::token_kind",
        "format/datetime::is_time_neighbor",
        "format/datetime::push_literal",
        "format/datetime::render_datetime_literal",
        "format/datetime::format_elapsed",
        "format/datetime::TimeParts::from_serial",
        "format::measured_host",
        "format::currency_literal",
        "format::digits",
        "format::fifteen",
        "format::split",
        "format::grouped",
        "format::general",
        "format::significant",
        "format::sections",
        "format::bracket",
        "format::is_condition",
        "format::is_elapsed",
        "format::condition_holds",
        "format::condition_of",
        "format::strip_tokens",
        "format::choose",
        "format::items",
        "format::numeric",
        "format::literal_text",
        "format::integer_part",
        "format::fraction_part",
        "format::scientific",
        "format::fraction_code",
        "format::FractionCode::render",
        "format::mixed_fraction_under_space_grouping",
        "format::convergent",
        "format::text_declared_date_locale",
        "format::text",
        "format::text_of_text",
        "format/names::month_name",
        "format/names::weekday_name",
        "format/names::locale_names",
        "locale::LocaleId::from_bcp47_language_tag",
        "locale::LocaleId::from_excel_lcid",
        "locale::short_date_order",
        "locale::short_date_pattern",
        "locale::currency_placement",
        "locale::currency_spacing",
        "locale::currency_negative_pattern",
        "locale::format_profile",
        "locale::days_from_civil",
        "locale::civil_from_days",
        "locale::ymd_from_excel_serial",
        "number_text::decimal",
        "number_text::first_precision",
        "number_text::near_tie",
        "number_text::first_rounding",
        "number_text::rounded",
        "number_text::increment",
        "number_text::ascii",
        "ported/date_kernels::days_from_civil",
        "ported/date_kernels::civil_from_days",
        "ported/date_kernels::serial_unbounded_1900",
        "ported/date_kernels::ymd_1900",
        "ported/date_kernels::is_leap",
        "ported/date_kernels::days_in_month",
        "ported/date_kernels::whole_serial",
        "ported/date_kernels::whole",
        "ported/date_kernels::weekday_sunday_one_based",
        "ported/date_kernels::remap_weekday",
        "ported/date_kernels::weekday_of",
        "ported/date_kernels::weekday",
        "ported/text_kernels::text",
        "ported/text_kernels::text_from_str",
        "ported/text_kernels::date_integer_floor",
        "ported/text_kernels::push_singleton_or_original",
        "ported/text_kernels::push_upper",
        "ported/text_kernels::upper",
        "value_text::measured_host_reader",
        "value_text::measured_space",
        "value_text::read",
        "value_text::number",
        "value_text::decimal",
        "value_text::fraction",
        "value_text::tokens",
        "value_text::month_named",
        "value_text::time_at",
        "value_text::full_year",
        "value_text::valid_day",
        "value_text::this_year",
        "value_text::serial_1900",
        "value_text::date_of",
        "value_text::date_time"
      ],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/dates.rs#L281-L287",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 10 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.DATEVALUE.json",
  "name": "DATEVALUE",
  "notes": [
    {
      "basis": "66 recorded VALUE readings (all ten digits of each of the five scripts, then composed forms), 10 SQRT and 4 DATEVALUE readings.",
      "documentation": null,
      "evidence": [
        {
          "commit": "55697ab4f74bab852fef7bc76b08588c3a5f408e",
          "locator": "delivered_fn4_digit_scripts_and_numeric_date_widths",
          "note": "recorded answers pinned",
          "path": "apps/dna-onecalc/tests/acceptance.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": "sheets qt031 to qt096",
          "note": "66 recorded readings",
          "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": null,
          "note": "10 recorded readings",
          "path": "crates/calc-func/tests/captures/fn4_questions/SQRT.reading.json",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": null,
          "note": "6 recorded readings",
          "path": "crates/calc-func/tests/captures/fn4_questions/DATEVALUE.reading.json",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.DATEVALUE",
        "FUNC.SQRT",
        "FUNC.VALUE"
      ],
      "inferred": "That other text-to-number routes, such as arithmetic operators, treat digits the same way is inferred from VALUE and SQRT agreeing.",
      "kind": "quirk",
      "note_id": "FN-VALUE-001",
      "open": [
        "Other digit blocks (Bengali, Tibetan, Khmer and so on) have not been read.",
        "Whether the set depends on the Windows or workbook locale has not been read."
      ],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "=VALUE(\"١\")",
          "correct": null,
          "excel": {
            "bits": "0x3ff0000000000000",
            "display": "1",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt042, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"١٢٣\")",
          "correct": null,
          "excel": {
            "bits": "0x405ec00000000000",
            "display": "123",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt081, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"1٢3\")",
          "correct": null,
          "excel": {
            "bits": "0x405ec00000000000",
            "display": "123",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt084, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"١e2\")",
          "correct": null,
          "excel": {
            "bits": "0x4059000000000000",
            "display": "100",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt088, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"१\")",
          "correct": null,
          "excel": {
            "bits": "0x3ff0000000000000",
            "display": "1",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt062, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"๑\")",
          "correct": null,
          "excel": {
            "bits": "0x3ff0000000000000",
            "display": "1",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt072, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"１\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt032, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"1２3\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet qt093, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-text-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=SQRT(\"۱٢३๔\")",
          "correct": null,
          "excel": {
            "bits": "0x4041906d51932c26",
            "display": "35.12833614050059",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-SQRT-digits-6",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/SQRT.reading.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=DATEVALUE(\"٢٠٢٤-٠١-٠٢\")",
          "correct": null,
          "excel": {
            "bits": "0x40e61da000000000",
            "display": "45293",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-DATEVALUE-digits-1",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/DATEVALUE.reading.json",
            "repository": "DnaCalc"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "In the recorded en-ZA settings, converting text to a number accepts Arabic-Indic (U+0660 to U+0669), extended Arabic-Indic (U+06F0 to U+06F9), Devanagari (U+0966 to U+096F) and Thai (U+0E50 to U+0E59) digits. They work alone, in runs, with a decimal point, in the exponent, with a sign or percent, and mixed with ASCII digits or with each other: VALUE(\"1٢3\") is 123, and SQRT of a four-digit string using four scripts is the root of 1234. Fullwidth digits (U+FF10 to U+FF19) give #VALUE! alone or mixed. DATEVALUE reads the four accepted scripts in a date written year-month-day.",
      "status": "measured",
      "title": "Text to number reads Arabic, Persian, Devanagari and Thai digits, but not fullwidth digits"
    },
    {
      "basis": "45 recorded VALUE readings covering year, month and day tokens of one to five digits, and 2 DATEVALUE readings.",
      "documentation": null,
      "evidence": [
        {
          "commit": "55697ab4f74bab852fef7bc76b08588c3a5f408e",
          "locator": "delivered_fn4_digit_scripts_and_numeric_date_widths",
          "note": "recorded answers pinned",
          "path": "apps/dna-onecalc/tests/acceptance.rs",
          "repository": "DnaCalc"
        },
        {
          "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
          "locator": "sheets ql041 to ql085",
          "note": "45 recorded readings",
          "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-list-controls.capture.json",
          "repository": "DnaCalc"
        }
      ],
      "functions": [
        "FUNC.DATEVALUE",
        "FUNC.VALUE"
      ],
      "inferred": null,
      "kind": "quirk",
      "note_id": "FN-VALUE-002",
      "open": [
        "Three-digit years were not read.",
        "Other date orders and locales were not read."
      ],
      "recorded_on": "2026-11-04",
      "repros": [
        {
          "call": "=VALUE(\"2024/02/01\")",
          "correct": null,
          "excel": {
            "bits": "0x40e6216000000000",
            "display": "45323",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet ql078, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-list-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"2024/02/001\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet ql079, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-list-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"2024/002/01\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet ql081, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-list-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"1/2/1\")",
          "correct": null,
          "excel": {
            "bits": "0x40e2076000000000",
            "display": "36923",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet ql041, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-list-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"24/2/1\")",
          "correct": null,
          "excel": {
            "bits": "0x40e6216000000000",
            "display": "45323",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet ql065, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-list-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"0001/2/1\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet ql057, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-list-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"2024/02/0\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet ql084, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-list-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=VALUE(\"2024-02-001\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088 Current Channel, Windows 64-bit (NT 10.0.26200), x86-64, AMD Ryzen 7 4800H, en-ZA",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "sheet ql085, row 20, column 10",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/functions-fn4-list-controls.capture.json",
            "repository": "DnaCalc"
          }
        },
        {
          "call": "=DATEVALUE(\"2024-002-01\")",
          "correct": null,
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file",
          "source": {
            "commit": "2d0eddcac86413014643af81d646581d54ba57bc",
            "locator": "fn7-DATEVALUE-digits-5",
            "note": null,
            "path": "crates/calc-func/tests/captures/fn4_questions/DATEVALUE.reading.json",
            "repository": "DnaCalc"
          }
        }
      ],
      "schema": "efh.function-note/v1",
      "statement": "In a three-part numeric date, leading zeros are not free. VALUE(\"2024/02/01\") is 45323, but VALUE(\"2024/02/001\") and VALUE(\"2024/002/01\") are #VALUE!, and so is any month or day of three or more digits in the 45 forms read. A year of one, two or four digits is read: \"1/2/1\" and \"1/02/01\" are 2001-02-01, \"24/2/1\" is 2024-02-01, while \"0001/2/1\" is #VALUE!. Month 0 and day 0 give #VALUE!. The same limit holds with hyphens: \"2024-02-001\" through VALUE, and \"2024-002-01\" and \"2024-02-001\" through DATEVALUE, are #VALUE!. The settings of this run are en-ZA: decimal point, space as thousands separator, year-month-day date order.",
      "status": "measured",
      "title": "A date as text takes at most two digits for month and day"
    }
  ],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n### Relationships\n\n\n- **[DATE](FUNC.DATE.md)** — the deterministic alternative. Every piece of advice in this category\n  amounts to \"use `DATE`, not text\", and this function is why the advice exists.\n- **[TIMEVALUE](FUNC.TIMEVALUE.md)** — the mirror: parses the time part and ignores the date part,\n  where `DATEVALUE` parses the date part and ignores the time part. Composing them —\n  `DATEVALUE(t) + TIMEVALUE(t)` — is the documented-behaviour way to parse a full timestamp from\n  one string.\n- **[DAYS](FUNC.DAYS.md)** — documented to route *its* text arguments through `DATEVALUE`, which\n  imports this function's locale dependence into an otherwise numeric function.\n- **The `VALUE` function** — the general text-to-number conversion, which also accepts date text in\n  practice; the relationship between the two accepted sets is not documented, and it is checked\n  here only for digit scripts (FN-VALUE-001) and the digits of year, month and day (FN-VALUE-002).\n- **Confusable.** `DATEVALUE` and `DATE` are interchanged constantly in advice, and they have\n  nothing in common but a name and a return kind.\n\n\n",
    "how-to-implement": "\n### Notes for implementers\n\n\n1. **The grammar is host state, not a constant.** An implementation must take the locale (or an\n   explicit format profile) as an input. A hard-coded `MM/DD/YYYY` parser is not an implementation\n   of this function; it is an implementation of one of its configurations.\n2. **The system clock is an input too.** The year-omitted rule makes this function\n   time-dependent — a property it shares only with [NOW](FUNC.NOW.md) and [TODAY](FUNC.TODAY.md) in\n   this category, and unlike them it is not declared volatile. A cached result of `DATEVALUE(\"3/4\")`\n   can therefore become quietly wrong at a year boundary.\n3. **Fail loudly on ambiguity.** Where the configured format admits two readings, there is no\n   correct silent choice.\n4. **Do not attempt an `excel-bitexact` claim from a grammar you inferred.** Until the accepted set\n   is characterized under a named locale, an implementation can only state which forms it accepts,\n   not which forms Excel accepts.\n\n\n",
    "quirks": "\n### Result and edge cases\n\n\nReturns a `Number`: a whole date serial with no time component.\n\n- **Leading and trailing whitespace, separators, and month-name spellings** are all part of the\n  undocumented accepted set. The Handbook's\n  [coercion chapter](../model/02-coercion-and-lifting.md) already flags the broader text-to-number\n  recognizer as an open area with a locale-dependent surface that has been probed only at the\n  edges; `DATEVALUE` is where that open area is most exposed.\n- **Two-digit years** have a pivot convention that the documentation does not state. Through\n  `VALUE`, in en-ZA year-month-day order, FN-VALUE-002 reads \"24/2/1\" as 2024 and \"1/2/1\" as 2001.\n  Where the window turns over has not been read.\n- **A date before 1 January 1900** is documented as `#VALUE!` rather than `#NUM!` — worth noting,\n  because out-of-range *serials* elsewhere in the category give `#NUM!`. Here the failure is a\n  parse failure, and it takes the parse failure's error value.\n\n\n\n### Errors\n\n\nAs documented:\n\n- `#VALUE!` when `date_text` does not represent a date Excel can parse, or when the resulting date\n  falls outside the representable range.\n\nAn error value passed in propagates in the ordinary way.\n\n\n",
    "sources": "\n- Microsoft 365 support, **DATEVALUE function** —\n  <https://support.microsoft.com/en-us/office/datevalue-function-df8b07d4-7761-4a93-bc33-b7471bbff252>.\n  Source of the argument description, the documented date range, the year-omitted rule, the\n  ignored-time rule and the `#VALUE!` condition.\n- [FUNC.DATE](FUNC.DATE.md) — the serial-number model and the 1900/1904 systems.\n- Handbook call-model chapter [02 coercion and lifting](../model/02-coercion-and-lifting.md), whose\n  open question about the locale-dependent text recognizer this function embodies.\n- `data/functions/FUNC.DATEVALUE.json`, `data/presence/FUNC.DATEVALUE.json`,\n  `data/battery/FUNC.DATEVALUE.json`.\n\n",
    "version-differences": "No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.",
    "what-it-does": "\n`DATEVALUE` converts text that reads as a date into the corresponding date serial. Microsoft's\ndescription of the argument is worth reading literally: it accepts \"text that represents a date in\nan Excel date format\" — that is, the function's domain is defined by *Excel's* date formats, not by\nany fixed grammar. `\"1/30/2008\"` and `\"30-Jan-2008\"` are the documented examples.\n\nThat phrasing is the whole story of this function. Its domain is:\n\n- **clock-dependent** — Microsoft documents that when the year is missing from `date_text`, the\n  function \"uses the current year from your computer's system clock\". A parse of `\"3/4\"` therefore\n  returns a different answer in different years, which makes `DATEVALUE` non-deterministic in a way\n  the category's other conversions are not;\n- **format-set-dependent** — the accepted forms are those Excel would accept when typing into a\n  cell, a set that is not enumerated in the documentation.\n\nTogether, those three make `DATEVALUE` the least specifiable function in this assignment. The\nmathematics is trivial; the specification is the problem.\n\nMicrosoft also documents two firm rules:\n\n- **Time information in `date_text` is ignored.** `DATEVALUE(\"1/1/2024 13:00\")` yields a whole\n  serial; the fraction is discarded. [TIMEVALUE](FUNC.TIMEVALUE.md) is the mirror image.\n- **The result must fall in range.** Under the default Windows date system, the date must lie\n  between 1 January 1900 and 31 December 9999; outside that, `#VALUE!`.\n\n\n\n### Arguments\n\n\n`DATEVALUE(date_text)` — one required argument.\n\n**date_text** — \"text that represents a date in an Excel date format, or a reference to a cell that\ncontains text that represents a date in an Excel date format\".\n\nTwo argument-position subtleties matter more here than the singular argument count suggests:\n\n1. **A cell that already contains a real date is the wrong input.** If the cell holds a date, it\n   holds a number, and `DATEVALUE` is being asked to parse a number. The function exists for text\n   that Excel did *not* convert on entry — typically imported data.\n2. **The year-omitted case is a live behaviour, not a degenerate one.** Microsoft documents it\n   explicitly, and it is the reason a workbook built in one year can produce different values when\n   recalculated in the next.\n\n\n"
  },
  "signature": {
    "display": "DATEVALUE(date_text)",
    "parameters": [
      {
        "description": null,
        "name": "date_text",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 1,
        "min": 1
      },
      "category": "Date and time functions",
      "classification": {
        "arg_preparation_profile": "ValuesOnlyPreAdapter",
        "coercion_lift_profile": "Custom",
        "determinism_class": "Deterministic",
        "error_collapse_profile": "None",
        "fec_dependency_profile": "LocaleProfile",
        "host_interaction_class": "None",
        "kernel_signature_class": "Custom",
        "rich_value_usage": "RichBlind",
        "surface_fec_dependency_profile": "Composite",
        "thread_safety_class": "SafePure",
        "volatility_class": "NonVolatile"
      },
      "descriptions": {
        "long": null,
        "short": "Serial date number read from a date written as text",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": "Converts a date in the form of text to a serial number",
        "microsoft_url": "https://support.microsoft.com/en-us/office/datevalue-function-df8b07d4-7761-4a93-bc33-b7471bbff252"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [
        {
          "locale": "ar-SA",
          "name": "DATEVALUE"
        },
        {
          "locale": "bg-BG",
          "name": "DATEVALUE"
        },
        {
          "locale": "cs-CZ",
          "name": "DATUMHODN"
        },
        {
          "locale": "da-DK",
          "name": "DATEVALUE"
        },
        {
          "locale": "de-DE",
          "name": "DATWERT"
        },
        {
          "locale": "el-GR",
          "name": "DATEVALUE"
        },
        {
          "locale": "en-AU",
          "name": "DATEVALUE"
        },
        {
          "locale": "en-GB",
          "name": "DATEVALUE"
        },
        {
          "locale": "en-US",
          "name": "DATEVALUE"
        },
        {
          "locale": "es-ES",
          "name": "FECHANUMERO"
        },
        {
          "locale": "et-EE",
          "name": "DATEVALUE"
        },
        {
          "locale": "fi-FI",
          "name": "PÄIVÄYSARVO"
        },
        {
          "locale": "fr-FR",
          "name": "DATEVAL"
        },
        {
          "locale": "he-IL",
          "name": "DATEVALUE"
        },
        {
          "locale": "hr-HR",
          "name": "DATEVALUE"
        },
        {
          "locale": "hu-HU",
          "name": "DÁTUMÉRTÉK"
        },
        {
          "locale": "id-ID",
          "name": "DATEVALUE"
        },
        {
          "locale": "it-IT",
          "name": "DATA.VALORE"
        },
        {
          "locale": "ja-JP",
          "name": "DATEVALUE"
        },
        {
          "locale": "ko-KR",
          "name": "DATEVALUE"
        },
        {
          "locale": "lt-LT",
          "name": "DATEVALUE"
        },
        {
          "locale": "lv-LV",
          "name": "DATEVALUE"
        },
        {
          "locale": "nb-NO",
          "name": "DATOVERDI"
        },
        {
          "locale": "nl-NL",
          "name": "DATUMWAARDE"
        },
        {
          "locale": "pl-PL",
          "name": "DATA.WARTOŚĆ"
        },
        {
          "locale": "pt-BR",
          "name": "DATA.VALOR"
        },
        {
          "locale": "pt-PT",
          "name": "DATA.VALOR"
        },
        {
          "locale": "ro-RO",
          "name": "DATEVALUE"
        },
        {
          "locale": "ru-RU",
          "name": "ДАТАЗНАЧ"
        },
        {
          "locale": "sk-SK",
          "name": "DATEVALUE"
        },
        {
          "locale": "sl-SI",
          "name": "DATEVALUE"
        },
        {
          "locale": "sr-Latn-RS",
          "name": "DATEVALUE"
        },
        {
          "locale": "sv-SE",
          "name": "DATUMVÄRDE"
        },
        {
          "locale": "th-TH",
          "name": "DATEVALUE"
        },
        {
          "locale": "tr-TR",
          "name": "TARİHSAYISI"
        },
        {
          "locale": "uk-UA",
          "name": "DATEVALUE"
        },
        {
          "locale": "vi-VN",
          "name": "Hàm DATEVALUE"
        },
        {
          "locale": "zh-CN",
          "name": "DATEVALUE"
        },
        {
          "locale": "zh-HK",
          "name": "DATEVALUE"
        },
        {
          "locale": "zh-TW",
          "name": "DATEVALUE"
        }
      ],
      "signature": {
        "display": "DATEVALUE(date_text)",
        "parameters": [
          {
            "description": null,
            "name": "date_text",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "DATEVALUE",
      "version_marker": null,
      "xlcall": {
        "code": "140",
        "symbol": "xlfDatevalue"
      }
    },
    "microsoft": "https://support.microsoft.com/en-us/office/datevalue-function-df8b07d4-7761-4a93-bc33-b7471bbff252"
  },
  "try_it": {
    "formula": "=DATEVALUE(\"6 Nov 2026\")"
  },
  "url": "https://handbook.dnacalc.com/functions/DATEVALUE.html",
  "variants": [],
  "versions": [
    {
      "behaviour": "=DATEVALUE(\"٢٠٢٤-٠١-٠٢\") returned 45293 (0x40e61da000000000). =DATEVALUE(\"2024-002-01\") returned #VALUE!. Inputs were supplied through formula literals. These are controls from this environment, not a same-input comparison with another build.",
      "excel_build": "16.0.20527.20088",
      "observations": [
        {
          "call": "=DATEVALUE(\"٢٠٢٤-٠١-٠٢\")",
          "excel": {
            "bits": "0x40e61da000000000",
            "display": "45293",
            "kind": "number"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file"
        },
        {
          "call": "=DATEVALUE(\"2024-002-01\")",
          "excel": {
            "bits": null,
            "display": "#VALUE!",
            "kind": "error"
          },
          "input_route": "formula-literal",
          "inputs": [],
          "recorded_in": "Excel 16.0.20527.20088, Windows, bitness and CPU not recorded in this reading file"
        }
      ],
      "platform": "Windows, bitness and CPU not recorded in this reading file",
      "sources": [
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/3345a87/content/notes/FN-VALUE-001.json",
        "https://github.com/DnaCalc/ExcelFunctionsHandbook/blob/3345a87/content/notes/FN-VALUE-002.json"
      ]
    }
  ]
}