The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,154 other followers

Archive for September 7th, 2016

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

Posted by jpluimers on 2016/09/07

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

Posted in Database Development, Development, OracleDB, Software Development | Leave a Comment »

 
%d bloggers like this: