Skip to content

Short Date (Day-Month-Year, 2-digit year)

Type Registry

Short Date (Day-Month-Year, 2-digit year)

datetime.date.short_dmy

Two-digit year, day-first. Dash-separated. Common in legacy systems and short-form data entry.

Domain datetimedate
Casts to DATE
Scope Universal

Try it

CLI
$ finetype infer -i "15-01-24"
→ datetime.date.short_dmy

DuckDB

Detect
SELECT finetype('15-01-24');
-- → 'datetime.date.short_dmy'
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.short_dmy';

JSON Schema

finetype schema datetime.date.short_dmy
{
  "$id": "https://noon.sh/schemas/datetime.date.short_dmy",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Two-digit year, day-first. Dash-separated. Common in legacy systems and short-form data entry.",
  "examples": [
    "15-01-24",
    "31-12-99"
  ],
  "maxLength": 8,
  "minLength": 8,
  "pattern": "^\\d{2}-\\d{2}-\\d{2}$",
  "title": "Short Date (Day-Month-Year, 2-digit year)",
  "type": "string"
}

Examples

15-01-2431-12-99

Types in datetime