天天看点

Informix 获得当前时间,时间格式

-- 默认 YYYY - MM - DD
select today from dual;

-- 格式 YYYYMMDD
select YYYYMMDD(today) from dual;

-- 格式 YYYY - MM - DD HH:mm:ss:000
select current from dual;

-- 格式 HHmmss
select hhmmss(current) from dual;

-- 格式 YYYY/MM/DD
select to_char(current,'%Y/%m/%d') from dual;

-- 格式 HHmmss
select to_char(current, '%H%M%S') from dual;
           

继续阅读