Meridianmeridian

DMY Date (dash-separated)

datetime.date.dmy_dash

Day-Month-Year with dash separators and 4-digit year. Extremely common in EU informal data and Pandas examples. Ambiguous with mdy_dash when day <= 12.

Domain
datetime
Category
date
Casts to
DATE
Scope
Universal

Try it

CLI
$ finetype infer -i "15-01-2024"
→ datetime.date.dmy_dash

DuckDB

Detect
SELECT finetype('15-01-2024');
-- → 'datetime.date.dmy_dash'
Cast expression
strptime({col}, '%d-%m-%Y')::DATE
-- Format: %d-%m-%Y
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS DATE) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'datetime.date.dmy_dash';

JSON Schema

finetype schema datetime.date.dmy_dash
{
  "$id": "https://meridian.online/schemas/datetime.date.dmy_dash",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Day-Month-Year with dash separators and 4-digit year. Extremely common in EU informal data and Pandas examples. Ambiguous with mdy_dash when day <= 12.",
  "examples": [
    "15-01-2024",
    "31-12-2023",
    "01-06-2000"
  ],
  "maxLength": 10,
  "minLength": 10,
  "pattern": "^\\d{2}-\\d{2}-\\d{4}$",
  "title": "DMY Date (dash-separated)",
  "type": "string",
  "x-finetype-broad-type": "DATE",
  "x-finetype-format-string": "%d-%m-%Y",
  "x-finetype-transform": "strptime({col}, '%d-%m-%Y')::DATE"
}

Examples

15-01-202431-12-202301-06-2000