Working with 'OLD' dates

Codes here !

Moderators: macek, egami, gesf

Post Reply
User avatar
Posts: 312
Joined: Sat Apr 05, 2003 4:33 am
Location: Mansfield, UK

Post by bezmond » Mon Apr 07, 2003 10:41 pm

assuming you know how to retrieve the date from your database and assign it a variable (which I will call $year), you can use the following:

Code: Select all

$date = date(Y);
$age = $date - $year;
echo $age;

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests