Wednesday, April 6, 2011

Oracle SQL: Convert a String to DateTime


 Convert a  string (with a data & time)  To  DateTime in SQL:

select to_date(TO_CHAR(sysdate,'MM/DD/YYYY')||' 12:00:01 AM','MM/DD/YYYY hh:mi:ss pm') from dual;




highlighted one will be String containing date time.

:-)

No comments: