function fecha_mysql('".$_Post['dia']."') {// DD-MM-AAAA a AAAA-MM-DDreturn substr($s,6,4)."-".substr($s,3,2)."-".substr($s,0,2);}