Quantcast
Channel: OracleDB – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 20

sql – Oracle to_date() to parse input to datetime values – via Stack Overflow

$
0
0

The Oracle to_date() function has saved me numerous times parsing date time strings into datetime values like this:

to_date('29/07/2015 13:18:00', 'DD/MM/YYYY HH24:MI:SS')

One gotcha is that when you query back the resulting date-time values, they might be formatted differently because of NLS_DATE_FORMAT settings

In addition to the query for ‘nls_date_format’ mentioned in sql – Oracle to_date() incorrect output – Stack Overflow, I usually use this one:

select v.*
from v$parameter v
where name like 'nls_%'
order by lower(v.name)
;

–jeroen


Filed under: Database Development, Development, OracleDB, Software Development

Viewing all articles
Browse latest Browse all 20

Trending Articles