In Oracle there are two usefull function to format a timestamp to string and vceversa…. To format a date to string you can use TO_CHAR function like this:
1 |
SELECT TO_CHAR(sysdate, 'DD-MON-YYYY HH24:MI:SSxFF') from dual; |
For viceversa To format a string to date you can use TO_ function like this:
1 |
SELECT TO_DATE('2003/07/09', 'yyyy/mm/dd') from dual; |
The format mask list: Parameter Explanation YEAR Year, spelled out…
Leggi tutto