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
Post a Comment