<?php
include("../config.php3");
include($BIB."bib_generic.php3");

$rows = main_db_query("SELECT * FROM Members WHERE Birthdate != ''");
while($row = db_fetch_array($rows))
{
	$tab = explode("-", $row['Birthdate']);
	$newAge = sprintf ("%04d-%02d-%02d", $tab[2], $tab[1], $tab[0]);
	main_db_query("UPDATE Members SET Birthdate = '".$newAge."' WHERE Id='".$row['Id']."'");
	$r++;
}
echo $r;
?>