Hola Compañeros. Veran, realizo una consulta donde los resultados son guardados en excel donde tengo 3 campos que son fechas, mi problema es que esos campos en el archivo, la fecha me la ordena como mm/dd/yyyy, cuando necesito que los ordene como dd/mm/yyyy, y al hacer la consulta desde consola, la fecha esta en el formato que necesito, no se porque hace eso al pasarlo a excel. les dejo el codigo que tengo hasta el momento.
Código PHP:
Ver original<?
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header ("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT"); header ("Cache-Control: no-cache, must-revalidate"); header("Content-type: application/vnd.ms-excel; name='excel'"); header("Content-Disposition: attachment; filename=Siadcell".date(dMy
).".xls");
include "include/conexionifx.php";
$query = "
select
t02id,c06_desc,c04_cia,t01_marca,t01_modelo,c05_plancia,
t01_serie,t01_numcel,t02_usu,t02_nombre,t02_puesto,
t02_ctocosto,t02_fasig,t02_origen,t94_fechaini,
t94_fechafin, t02_fbaja
from t02telusu,t01telefono, C06PLAZAS, c05planes, c04ciatel, t94_vadendum
where t01ID = t02_tel
and t01_plaza = c06id
and t02_plan = c05id
and t01_cia = c04id
and (t02_ctocosto in ('508','509','516','638')
or t02_ctocosto matches '*9999*'
or t02_ctocosto matches '*8888*')
AND t02_status = 'A'
and t01_numcel = t94_telefono
ORDER BY t02id
";
//echo $query;
$result=ifx_prepare($query,$conecta,IFX_SCROLL);
ifx_do($result);
?>
Código HTML:
Ver original <?
while($row=ifx_fetch_row($result,"NEXT")){
?>
<td><? echo $row[t02id];?></td> <td><? echo $row[c06_desc];?></td> <td><? echo $row[c04_cia];?></td> <td><? echo $row[t01_marca];?></td> <td><? echo $row[t01_modelo];?></td> <td><? echo $row[c05_plancia];?></td> <td><? echo $row[t01_serie];?></td> <td><? echo $row[t01_numcel];?></td> <td><? echo $row[t02_usu];?></td> <td><? echo $row[t02_nombre];?></td> <td><? echo $row[t02_puesto];?></td> <td><? echo $row[t02_ctocosto];?></td> <td style = "@"><? echo $row[t02_fasig];?></td> <td><? echo $row[t02_origen];?></td> <td style = "@"><? echo $row[t94_fechaini];?></td> <td style = "@"><? echo $row[t94_fechafin];?></td> <td><? echo $row[t02_fbaja];?></td> <?
}
?>
gracias!!!