Re: help with date

From: Paul Delannoy (delannoy_at_univ-lemans.fr)
Date: 04/19/04


Date: Mon, 19 Apr 2004 22:26:19 +0200

Kelly a écrit:
> Can some tell me how I could change
> 1965-11-15 into just 1965.
>
> I need to calculate ages so I will just get
> $year = date(Y);
> $age = $year - $birthYear;
Use getdate instead of date :
http://fr3.php.net/manual/en/function.getdate.php
so you have an array $a containing the year in $a['year']
HTH