Notion formulas can parse dates from text strings, but the built-in parseDate() function only accepts a limited set of standard date formats. If your source data contains dates in formats like “2023/12/25” or “25-Dec-2023” or “December 25, 2023”, parseDate() will return an error. This article explains exactly which formats parseDate() accepts, why non-standard strings fail, and how to reformat those strings into a parseable structure using other Notion formula functions. You will learn a repeatable method to convert almost any date string into a valid Notion date object.
Key Takeaways: parseDate() Format Rules and Workarounds
- ISO 8601 format (YYYY-MM-DD): The only format parseDate() accepts directly without modification.
- replaceAll() and slice(): Use these string functions to convert slashes, spaces, or non-standard month names into ISO 8601.
- dateSubtract() and dateAdd(): Use these to adjust offsets after the initial parse if the reformatted string still fails.
How parseDate() Interprets Strings and Why Non-Standard Formats Fail
The parseDate() function in Notion formulas expects a string that exactly matches the ISO 8601 date format: YYYY-MM-DD. This is the only format that Notion recognizes automatically. If the string contains forward slashes, spaces, commas, or abbreviated month names, parseDate() returns an empty result or an error.
Notion does not provide a date-parsing function with format specifiers like strptime in programming languages. Instead, you must manipulate the original string using Notion’s string functions — replaceAll(), slice(), concat(), and formatDate() — to produce a string that parseDate() can handle.
The root cause of the failure is that parseDate() performs zero intelligent guessing. It is not a natural-language parser. It checks only for the pattern YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss.sssZ (full ISO 8601 with time). Any deviation, including a missing leading zero on a month or day, causes the function to fail silently.
Accepted Input Examples
These strings work with parseDate():
"2023-12-25""2023-12-25T14:30:00.000Z""2023-12-25T14:30:00"
Rejected Input Examples
These strings fail with parseDate():
"2023/12/25"— forward slashes instead of hyphens"25-12-2023"— day-month-year order"Dec 25, 2023"— month abbreviation and comma"December 25, 2023"— full month name"2023-12-25 14:30"— space instead of T
Steps to Convert a Non-Standard Date String into a parseDate()-Compatible Format
The general strategy is to use replaceAll() to substitute characters and slice() to reorder date parts. Below are three common non-standard formats and the formula that converts each into ISO 8601.
Format 1: Slash-Delimited Dates (MM/DD/YYYY or DD/MM/YYYY)
- Identify the delimiter and order
Assume the source string is"12/25/2023"(month/day/year). If your data uses day/month/year, adjust the slice positions accordingly. - Replace slashes with hyphens
UsereplaceAll()to swap"/"with"-". The formulareplaceAll("12/25/2023", "/", "-")produces"12-25-2023". - Reorder the parts
BecauseparseDate()requires year-month-day, useslice()to extract segments and concatenate them. The full formula for MM/DD/YYYY is:slice("12/25/2023", 6, 10) + "-" + slice("12/25/2023", 0, 2) + "-" + slice("12/25/2023", 3, 5)
This returns"2023-12-25". - Pass the result to parseDate()
Final formula:parseDate(slice("12/25/2023", 6, 10) + "-" + slice("12/25/2023", 0, 2) + "-" + slice("12/25/2023", 3, 5))
Format 2: Date with Abbreviated Month Name (e.g., “Dec 25, 2023”)
- Replace the month abbreviation with its numeric equivalent
Use nestedreplaceAll()calls to map each month abbreviation to a two-digit number. Example for December:replaceAll("Dec 25, 2023", "Dec", "12")yields"12 25, 2023". - Remove the comma and space
Chain anotherreplaceAll()to strip the comma:replaceAll("12 25, 2023", ",", "")produces"12 25 2023". - Replace spaces with hyphens
replaceAll("12 25 2023", " ", "-")gives"12-25-2023". - Reorder to YYYY-MM-DD
Use slice as in Format 1. The final combined formula for"Dec 25, 2023"is:parseDate(slice(replaceAll(replaceAll(replaceAll("Dec 25, 2023", "Dec", "12"), ",", ""), " ", "-"), 6, 10) + "-" + slice(replaceAll(replaceAll(replaceAll("Dec 25, 2023", "Dec", "12"), ",", ""), " ", "-"), 0, 2) + "-" + slice(replaceAll(replaceAll(replaceAll("Dec 25, 2023", "Dec", "12"), ",", ""), " ", "-"), 3, 5))
Format 3: Date with Full Month Name (e.g., “December 25, 2023”)
- Replace the full month name with its numeric value
UsereplaceAll()for each month. Example:replaceAll("December 25, 2023", "December", "12")yields"12 25, 2023". - Remove comma and reorder
Apply the same steps as Format 2 from step 2 onward. The full formula mirrors the abbreviated month example but with the full month string.
If the Reformatting Still Fails
parseDate() Returns Empty After Reformatting
If the final string still contains leading or trailing spaces, parseDate() will reject it. Wrap the entire reformatted string in trim() before passing it to parseDate(). Example: parseDate(trim(your_reformatted_string)).
Date Parts Are Not Zero-Padded
If the month or day is a single digit (e.g., "2023-1-5"), parseDate() may still fail. Use if() and length() to prepend a leading zero. For a month value stored in a property Month, the formula if(length(prop("Month")) == 1, "0" + prop("Month"), prop("Month")) ensures two digits.
Time Component Present in Non-ISO Format
If the string includes a time after a space (e.g., "2023-12-25 14:30"), replace the space with T using replaceAll() and append :00 for seconds: replaceAll("2023-12-25 14:30", " ", "T") + ":00".
Comparison of Date Parsing Approaches in Notion Formulas
| Item | parseDate() with ISO String | Manual String Reformating |
|---|---|---|
| Input requirement | Exact ISO 8601 (YYYY-MM-DD) | Any string that can be manipulated |
| Complexity | Single function call | Multiple nested string functions |
| Error handling | Returns empty on mismatch | Requires trim() and zero-padding checks |
| Maintenance | Low — no formula changes needed | High — each source format needs a custom chain |
| Best use case | Data already in ISO format | Imported data from external systems |
You can now convert non-standard date strings into a format that parseDate() accepts using replaceAll(), slice(), and trim(). To simplify maintenance, consider storing the reformatted string in a separate formula property and referencing that property in your main formula. For dates that still fail after reformatting, use dateSubtract() and dateAdd() to correct any offset that results from a misinterpreted time zone.