| Another lawyer joke in Jokes & Funny Stuff |
|
|
| From outlook 2007 to Apple mail in Mac Discussion & Support |
|
|
| Something's wierd with my..system in Hardware Hangout |
|
|
| Why Enterprise Is Avoiding Windows 8 in Back Page News |
|
|
| Is Terrorism a Muslim Monopoly? in Real World News |
|
Posted 12 June 2011 - 15:56
Posted 12 June 2011 - 16:06
AnthonySterling, on 12 June 2011 - 15:59, said:
SELECT
id
, DATE_FORMAT(NOW(), '%Y') - DATE_FORMAT(dob, '%Y') - (DATE_FORMAT(NOW(), '00-%m-%d') < DATE_FORMAT(dob, '00-%m-%d')) AS age
, name
FROM
member
Posted 12 June 2011 - 16:36
select datediff('11-oct-1984',now())/365
SinghKing, on 12 June 2011 - 16:06, said:
Posted 12 June 2011 - 16:42
Posted 12 June 2011 - 16:49
function getAge($birthday){
list($day, $month, $year) = explode('/', $birthday);
$age = date('Y') - $year;
$month_diff = date('m') - $month;
$day_diff = date('d') - $day;
if($day_diff < 0 || $month_diff < 0){
$age--;
}
return $age;
}
Posted 13 June 2011 - 15:55
SELECT *, DATE_FORMAT(NOW(), '%Y') - DATE_FORMAT(aDoB, '%Y') - (DATE_FORMAT(NOW(), '00-%m-%d') < DATE_FORMAT(aDoB, '00-%m-%d')) AS age FROM members
Posted 13 June 2011 - 16:18
SinghKing, on 13 June 2011 - 15:55, said:
SELECT *, DATE_FORMAT(NOW(), '%Y') - DATE_FORMAT(aDoB, '%Y') - (DATE_FORMAT(NOW(), '00-%m-%d') < DATE_FORMAT(aDoB, '00-%m-%d')) AS age FROM members
Posted 13 June 2011 - 17:00
BGM, on 12 June 2011 - 16:36, said:
select datediff('11-oct-1984',now())/365