Hi Rafael,
Select all
TO_DATE('10/10/2013 12:48:55','dd/mm/yyyy')
It gives problem because when you go
convert string (char) to date, you need to inform exactly a mask that fits the string. In your case, as you reported date and time in your string, your date mask should contain hours as well.
Select all
TO_DATE('10/10/2013 12:48:55','dd/mm/yyyy hh24:mi:ss')
The "unique" mask possible for this conversion is this.
In these cases string-> to_date needs to inform the mask precisely.
Already when you will transform date-> to_char, it is not necessary to report with this accuracy. To_char becomes only the way you want to display your date in text (opposite to_date that you need to convert to date). Internally Date is treated as if it were a number. Therefore, there are no firewas of languages, masks and so on.
Let's say you have your field date (My_Date) with the date "10/10/2013 12:48:55". You can do n forms of
to_char with it, that is, you have n form of
display .
Select all
TO_CHAR(my_date,'dd/mm/yyyy') = "10/10/2013"
TO_CHAR(my_date,'dd-mm-yy') = "10-10-13"
TO_CHAR(my_date,'RRRRMMDD') = "20131010"
I hope I have helped.