I have field REPORTDATE (DATETIME).
In SQL Developer i can see its value in this format
29.10.2013 17:08:08
I found that in order to do the select of just a DATE I need to execute this:
SELECT TO_DATE (REPORTDATE, 'DD.MON.YYYY') AS my_date
FROM TABLE1
but it returns 0RA-01843: not a valid month
I want result to return only 29.10.2013
Best Answer
This makes no sense. You are converting a date into a date again. You use TO_DATE to convert a string literal into DATE.
You could use TRUNC to truncate the time element. If you want to use this value for DATE calculations, you could use it directly.
For example,
To display in a particular format, you could use TO_CHAR and proper FORMAT MASK.