ho risolto, dovevo solo invertire

$datatot = $_POST["aa"]."-".$_POST["mm"]."-".$_POST["gg"];

grazie ancora