select to_date('2012-01','yyyy-MM') from dual; select to_char(sysdate,'yyyy-mm') from dual sysdate可以换成你需要的日期类型的数据。