orcal转impalasql
to_char(inag_date,'yyyymmdd')
substr(regexp_replace(CAST(inag_date AS STRING),'-',''),1,8)
to_char(sysdate,'yyyymmdd')
substr(regexp_replace(CAST(now() AS STRING),'-',''),1,8)
substr(concat(psabuc001,'01'),1,8)
substr(cast(date_ as string),'-',''),1,8)
substr(replace(cast(now() as string),'-',''),1,8)
to_char(date_,'yyyymmdd')>=to_char(sysdate,'yyyymmdd')
substr(cast(date_ as string),1,8) >=substr(replace(cast(now() as string),'-',''),1,8)
from_unixtime(unix_timestamp(days_add(now(),7)),'yyyy-mm-dd')
from_utc_timestamp(substr(concat(psabuc001,'01'),1,8),'yyyy-mm-dd')
from_timestamp(substr(concat(psabuc001,'01'),1,8),'yyyy-mm-dd')
字符串转时间格格式
yyyymmdd转yyyyMMdd
select psabuc001 from erp_t;
select concat(psabuc001,'01') from erp_t;
select unix_timestamp(concat(psabuc001,'01'))from erp_t;
select from_unixtime(unix_timestamp(concat(psabuc001,'01'),'yyyyMMdd'))from erp_t;
substr(concat(psabuc001,'01'),1,8)
from_unixtime(unix_timestamp(days_add(now(),7)),'yyyy-mm-dd')
from_utc_timestamp(substr(concat(psabuc001,'01'),1,8),'yyyy-mm-dd')
from_timestamp(substr(concat(psabuc001,'01'),1,8),'yyyy-mm-dd')
substr(concat(psabuc001,'01'),1,8)