1、转换函数
select cast(substring(‘2016-06-05 00:00:00.0’,1,10) as int);
结果—》20160605
2、替换函数
select cast(substring(regexp_replace(‘2016-06-05 00:00:00.0’, ‘-’, ‘’),1,8) as int);
结果–》20160605
1、转换函数
select cast(substring(‘2016-06-05 00:00:00.0’,1,10) as int);
结果—》20160605
2、替换函数
select cast(substring(regexp_replace(‘2016-06-05 00:00:00.0’, ‘-’, ‘’),1,8) as int);
结果–》20160605