赞
踩
select to_char(t.detect_date,‘YYYY’)
select extract(year from now())为double precision 格式类型
select to_char((SELECT now()::timestamp),‘yyyy’)
select to_char((SELECT now()::timestamp+ ‘1 year’),‘yyyy’)
select to_char((SELECT now()::timestamp+ ‘-1 year’),‘yyyy’)
其他都为为 character varying 格式类型
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。