sql语句 oracle截取 与日期格式

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

oracle 中字段长度的截取  与 日期格式化的sql

select XM,to_char(to_data(substr(RSRQ,1,8),'yyyy-mm-dd'),'YYYY"年"MM"月"DD"日"') as RSRQ,
substrb(AJMC,1,30) as ajmc from table;


select XM,substr(RSRQ,1,4) ||'年'||substr(RSRQ,5,2) ||'月'||substr(RSRQ,7,2) || '日' as RSRQ from table;

 

转载于:https://my.oschina.net/u/3234821/blog/3047935

你可能感兴趣的:(sql语句 oracle截取 与日期格式)