plsql - Convert varchar2 to Date ('MM/DD/YYYY') in PL/SQL -


i need convert string varchar date in 'mm/dd/yyyy' format. input string '4/9/2013' , expected output '04/09/2013'. i.e. 2 digit month, 2 digit date , 4 digit year seperated by'/'

i have below data: doj varchar2(10 byte)column has '4/9/2013' value. using 'select to_date(doj,'mm/dd/yyyy') emptable. getting result 09-apr-13. want in 04/09/2013 format.

please advise. in advance.

easiest way convert varchar date; format varchar again in format want;

select to_char(to_date(doj,'mm/dd/yyyy'), 'mm/dd/yyyy') emptable; 

an sqlfiddle test with.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

javascript - Clean way to programmatically use CSS transitions from JS? -

android - send complex objects as post php java -