# YMD Date (dot-separated)

Key: `datetime.date.ymd_dot`

Year.Month.Day with dot separators. Unambiguous due to year-first ordering. Hungarian, Norwegian, and some East Asian administrative data.

Page: <https://meridian.online/docs/projects/finetype/types/datetime/date/ymd_dot>

Format: `%Y.%m.%d`

Samples: `2024.01.15`, `2023.12.31`, `2000.06.01`

## Written by

Each locale below writes this format with its CLDR date pattern at the styles named beside it.

`mn` short · `mn` (Mong-MN) short, medium

## Background

### Origin

In the Unicode CLDR locale data, the short date format for Mongolian (mn) is the pattern y.MM.dd.[[1]](https://raw.githubusercontent.com/unicode-org/cldr-json/main/cldr-json/cldr-dates-full/main/mn/ca-gregorian.json) In CLDR's date pattern syntax, MM is a numeric month of 2 digits, zero-padded if needed.[[2]](https://www.unicode.org/reports/tr35/tr35-dates.html) In CLDR's date pattern syntax, dd is a numeric day of the month of 2 digits, zero-padded if needed.[[2]](https://www.unicode.org/reports/tr35/tr35-dates.html) In CLDR's date pattern syntax, y is the calendar year written as a number, with examples running 2, 20, 201, 2017 and 20173.[[2]](https://www.unicode.org/reports/tr35/tr35-dates.html)

Wikipedia's list of date formats by country gives Mongolia's national standard format as yyyy-mm-dd, with leading zeroes.[[3]](https://en.wikipedia.org/wiki/List_of_date_formats_by_country) Wikipedia's list of date formats by country says that in Mongolia many people casually use yyyy/(m)m/(d)d or yyyy.(m)m.(d)d, with or without leading zeroes.[[3]](https://en.wikipedia.org/wiki/List_of_date_formats_by_country) In Mongolia the dotted year-first date is best read as an everyday variant that sits beside a dashed national standard, rather than a standard in its own right. (Meridian's view)

### Use

Wikipedia's list of date formats by country says that in China many people casually use (yy)yy/(m)m/(d)d or (yy)yy.(m)m.(d)d, with or without leading zeroes.[[3]](https://en.wikipedia.org/wiki/List_of_date_formats_by_country) A trailing full stop or a two-digit year is a sign you are looking at a neighbouring format, not this one. (Meridian's view)

DuckDB's strptime(text, format) function converts strings to timestamps according to the specified pattern.[[4]](https://duckdb.org/docs/current/sql/functions/dateformat.html) DuckDB's documentation says to use the try\_strptime function to return NULL on failure.[[4]](https://duckdb.org/docs/current/sql/functions/dateformat.html) Parsing with try\_strptime and the pattern %Y.%m.%d, then counting the NULLs, is a quick way to find the rows that do not fit before you commit to a cast. (Meridian's view)

## Sources

1. [ca-gregorian.json (mn)](https://raw.githubusercontent.com/unicode-org/cldr-json/main/cldr-json/cldr-dates-full/main/mn/ca-gregorian.json) — documentation
2. [Unicode Locale Data Markup Language (LDML) Part 4: Dates](https://www.unicode.org/reports/tr35/tr35-dates.html) — standard
3. [List of date formats by country](https://en.wikipedia.org/wiki/List_of_date_formats_by_country) — secondary source
4. [Date Format Functions](https://duckdb.org/docs/current/sql/functions/dateformat.html) — documentation
