2
How to format sysdate for dd/MM/yyyy on Oracle 11g?
2
How to format sysdate for dd/MM/yyyy on Oracle 11g?
7
Try it like this:
SELECT TO_DATE(TO_CHAR(sysdate, 'DD/MM/YYYY'), 'DD/MM/YYYY') AS data_formatada FROM tabela
3
We can use the year format RRRR, which makes the recognition of the century to convert the year being necessary only 2 digits, for example 50 as we have not yet reached 2050 will be converted to the year 1950, but if it is filled with 10 will be returned 2010, as the example.
SELECT TO_DATE('01/01/50','DD/MM/RRRR'),
TO_DATE('01/01/10','DD/MM/RRRR'),
TO_DATE('01/01/50','DD/MM/YYYY')
FROM DUAL
Browser other questions tagged sql oracle
You are not signed in. Login or sign up in order to post.