Oracle TO_DATE Examples


/ Published in: SQL
Save to your folder(s)

These are some examples of the Oracle TO_DATE Function


Copy this code and paste it in your HTML
  1. SELECT TO_DATE('16-OCT-2016')
  2. FROM DUAL;
  3.  
  4. SELECT TO_DATE('16-10-2016', 'DD-MM-YYYY')
  5. FROM DUAL;
  6.  
  7. SELECT TO_DATE('2016/10/14', 'YYYY/MM/DD')
  8. FROM DUAL;
  9.  
  10. SELECT TO_DATE('20161012', 'YYYYMMDD')
  11. FROM DUAL;
  12.  
  13. SELECT TO_DATE('08-10-2016', 'DD-MM-YYYY')
  14. FROM DUAL;
  15.  
  16. SELECT TO_DATE('08-10-2016', 'DD-MM-YYYY', 'NLS_DATE_LANGUAGE = AMERICAN')
  17. FROM DUAL;

URL: http://www.databasestar.com/oracle-to_date/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.