Hitung Umur Di Modul SwarakalibataDibuat
Login Terakhir
8 Tahun lalu,
Telah Dilihat 1546 Kali
| |
Sultan Account |
|
|
david walli
Mengatakan :
Sultan Account
pak roby code hitung umur gimana ya pak? |
|
| PHPMU.COM Support commented on 02 Agu 2017 20:29:15 Sultan Account |
|
|
|
Assalam, Coba dengan kode ini mas :
<?php
// Tanggal Lahir
$birthday = "1992-05-22";
// Convert Ke Date Time
$biday = new DateTime($birthday);
$today = new DateTime();
$diff = $today->diff($biday);
// Display
echo "Tanggal Lahir: ". date('d M Y', strtotime($birthday)) .'<br />';
echo "Umur: ". $diff->y ." Tahun";
?>
// Source : http://pixelbali.com/tutorial-website/cara-menghitung-umur-dari-tanggal-lahir-dengan-php.html |
|
| david walli commented on 02 Agu 2017 22:18:47 Sultan Account |
|
|
|
OK Pak Berhasil. Terdapat 1 File dilampirkan : 1. Screenshot_31.png (34 KB) |
|