DATEVALUE

Converts a “YYYY-MM-DD” formatted text to a date

Usage

DATEVALUE(text_date)

Parameters

text_date

(Required) The text representing the date in “YYYY-MM-DD” format

Examples

Example With these variables Result

DATEVALUE(“2024-01-12”)

(None)

DATE(2024, 1, 12)

DATEVALUE(date_str)

date_str is "2023-07-21"

DATE(2023, 7, 21)

DATEVALUE(“2024-3-4”)

(None)

DATE(2024, 3, 4)

More information

Ensure that the text is formatted as “YYYY-MM-DD”. If the input text is not in the correct format, two things could happen:

  • If the date format is wrong, an error will be reported. Ex: “01-02-2022” and “88-01-02” will report an error.
  • If you wrote “2023-01-02” thinking “1st of February”, DocuMold will instead read “January 2nd”.

Note that using a single digit for the month and day is acceptable. Ex: “2024-3-5”

If you use a variable, the value of the variable will not be modified. The DATEVALUE function returns the converted date, but if you use the variable elsewhere, it will still contain the original text.

If you use a variable, its value will not be modified. The DATEVALUE function will return the date value, but if you use the variable elsewhere, it will have its original text.

See also