Mysql stores dates universally as 2004-12-28
I need to extract the year, month and day in 3 different variables, anyone know how?
http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html :
SELECT DAY(your_date_field) AS dtDay, MONTH(your_date_field) AS dtMonth, YEAR(your_date_field) AS dtYear FROM your_table
or
http://www.php.net/manual/en/function.split.php :
list($year,$month,$day) = split("-",$your_date_variable_in_php);
or
http://www.php.net/manual/en/function.explode.php :
$atoms = explode('-',$your_date_variable_in_php);
$year = $atoms[0];
$month = $atoms[1];
$day = $atoms[2];
....and so on...
thanks :)
classic example of looking at the wrong pages of the reference :)
No Problem ;D