select trunc(months_between(sysdate,dob)/12) year, trunc(mod(months_between(sysdate,dob),12)) month, trunc(sysdate-add_months(dob,trunc(months_between(sysdate,dob)/12)*12+trunc(mod(months_between(sysdate,dob),12)))) day from ( Select to_date('15122000','DDMMYYYY') dob from dual );output
year month day
13 10 29
ไม่มีความคิดเห็น:
แสดงความคิดเห็น