date - split string based on character position in ORACLE 11g SQL -


i'm using oracle 11g sql developer

i have varchar2 column dates 0523 (mmdd).

i want convert them date column , have them 23-05 (dd-mm)..

any ideas?

well, can string operations directly format want:

substring(c, 3, 2)||'-'||substring(c, 1, 2) 

to convert date, can use:

to_date('2012'||c, 'yyyymmdd') 

to convert date form want:

to_char(<date>, 'dd-mm') 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -