To_timestamp() seems to not work

The following 2 queries return with errors of “Input text cannot be formatted to date”:

select to_timestamp('13/04/2024 20:17:55','DD/MM/YYYY HH:MI:SS');
select to_date('13/04/2024 20:17:55','DD/MM/YYYY HH:MI:SS');

When I run them in Snowflake, they return without errors.

Am I missing something obvious?

I am looking at documentation here: TO_TIMESTAMP | Dremio Documentation

  • It seems to indicate I’m using to_timestamp() correctly.

I’m running this Dremio version via docker-compose:
Community Edition
Build Time
04/05/2024 15:31:52

Hey @capnjosh, Welcome to the Dremio Community!

Change the HH to HH24. See the format elements for Date/Timestamp for Dremio here: Date/Time | Dremio Documentation

select to_timestamp('13/04/2024 20:17:55','DD/MM/YYYY HH24:MI:SS');
select to_date('13/04/2024 20:17:55','DD/MM/YYYY HH24:MI:SS');
1 Like

Hahah… well, that was it! I completely missed there is a way to specify 12-hour vs 24-hour hour positions.