fungsi

 function datediff($per,$d1,$d2) {
        $d = $d2-$d1;
        switch($per) {
                case "yyyy": $d/=12;
                case "m": $d*=12*7/365.25;
                case "ww": $d/=7;
                case "d": $d/=24;
                case "h": $d/=60;
                case "n": $d/=60;
        }
        return round($d);
}

cara manggil :D

$waktu_awal=mktime(0,0,0,11,25,1985);
$waktu_akhir=mktime(0,0,0,date("m"),date("j"),date("Y"));
echo datediff("yyyy",$waktu_awal,$waktu_akhir)." tahun <br>";
echo datediff("m",$waktu_awal,$waktu_akhir)." bulan <br>";
echo datediff("ww",$waktu_awal,$waktu_akhir)." minggu <br>";
echo datediff("d",$waktu_awal,$waktu_akhir)." hari <br>";
echo datediff("h",$waktu_awal,$waktu_akhir)." jam <br>";
echo datediff("n",$waktu_awal,$waktu_akhir)." detik <br>";

nich contoh penggalan program dengan menggunkan php moga membantu

Pada tanggal 06/07/20, kasiman peranginangin <[EMAIL PROTECTED]>
menulis:
>
>   Bagaimana caranya untuk mengetahui selisih antara dua tanggal? misalnya
> lahir tanggal 17-08-1945 mau tahu umurnya sekarang ... tahun ... bulan ...
> hari.
> Kalau bisa ada rekan-rekan yang bantu beri skripnya pada PHP yah.
> Please help...!!!
>
>
> ---------------------------------
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail Beta.
>
> [Non-text portions of this message have been removed]
>
>  
>



-- 
                     "Urip Pisan Jo` Digawe Soro"
         add fs and YmId   AmiGelz [at] yahoo [dot] com
-=*=-AmiGelz || NFS || Agen_dosa A.K.A Nurma A K H -=*=-


[Non-text portions of this message have been removed]



-- 
www.itcenter.or.id - Komunitas Teknologi Informasi Indonesia 
Info, Gabung, Keluar, Mode Kirim : [EMAIL PROTECTED] 
:: Hapus bagian yang tidak perlu (footer, dst) saat reply! :: 
## Jobs: itcenter.or.id/jobs ## Bursa: itcenter.or.id/bursa ##
$$ Iklan/promosi : www.itcenter.or.id/sponsorship $$

[@@] Jaket ITCENTER tersedia di http://shop.itcenter.or.id 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ITCENTER/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Kirim email ke