Terdapat bermacam cara untuk menghitung umur di oracle, salah satu yang dapat digunakan adalah sebagai berikut:

select months_between( end_date, start_date ),
trunc( months_between( end_date, start_date ) /12 ) tahun,
mod( trunc( months_between( end_date, start_date ) ), 12 ) bulan,
greatest(0,end_ date – add_months(start_ date,trunc( months_between( end_date, start_date ) ))) hari
from dual

Semoga bermanfaat

CP

2 Responses to “Menghitung Umur (Tahun, Bulan, Hari)”

  1. waaa… master oracle…
    makan-makan lagi cep :p

  2. tolong kasih artikel mengenai komponen-komponen komputer berserta gambar nya ya.!!!!
    ^_^

Leave a Reply

(required)

(required)


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2012 cipta.web.id Suffusion theme by Sayontan Sinha