Skip to content

ISO 8601 Compact

Type Registry

ISO 8601 Compact

datetime.timestamp.iso_8601_compact

Compact ISO 8601 without separators. Common in filenames, log identifiers, and systems with character constraints.

Domain datetimetimestamp
Casts to TIMESTAMP
Scope Universal

Try it

CLI
$ finetype infer -i "20240115T103000"
→ datetime.timestamp.iso_8601_compact

DuckDB

Detect
SELECT finetype('20240115T103000');
-- → 'datetime.timestamp.iso_8601_compact'
Cast expression
strptime({col}, '%Y%m%dT%H%M%S')
Format: %Y%m%dT%H%M%S
Safe cast pipeline
-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS TIMESTAMP) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'datetime.timestamp.iso_8601_compact';

JSON Schema

finetype schema datetime.timestamp.iso_8601_compact
{
  "$id": "https://noon.sh/schemas/datetime.timestamp.iso_8601_compact",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Compact ISO 8601 without separators. Common in filenames, log identifiers, and systems with character constraints.",
  "examples": [
    "20240115T103000",
    "20191231T235959"
  ],
  "maxLength": 15,
  "minLength": 15,
  "pattern": "^\\d{8}T\\d{6}$",
  "title": "ISO 8601 Compact",
  "type": "string"
}

Examples

20240115T10300020191231T235959

Types in datetime