oracle通过身份证号码获取年龄时间:2024-02-23 17:23:27 select trunc((to_char(sysdate, \'yyyyMMdd\') - to_char(to_date(substr(\'110101201701010016\', 7, 8), \'yyyy-MM-dd\'), \'yyyyMMdd\')) / 10000) 年龄 from dual; 执行结果: