-
Notifications
You must be signed in to change notification settings - Fork 630
Open
Description
DuckDB allows both "string" and identifier values for the part
in its EXTRACT(part FROM date)
function: https://duckdb.org/docs/stable/sql/functions/date.html#extractpart-from-date
For example:
> duckdb
DuckDB v1.3.0 (Ossivalis) 71c5c07cdd
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D SELECT EXTRACT('hour' FROM current_localtimestamp());
┌──────────────────────────────────────────────────┐
│ main.date_part('hour', current_localtimestamp()) │
│ int64 │
├──────────────────────────────────────────────────┤
│ 9 │
└──────────────────────────────────────────────────┘
However the parser fails on this syntax w/ error: ParserError("Expected: date/time field, found: 'hour'")
Metadata
Metadata
Assignees
Labels
No labels