Ver Mensaje Individual
  #5 (permalink)  
Antiguo 05/08/2012, 16:37
codigophp
 
Fecha de Ingreso: agosto-2012
Mensajes: 9
Antigüedad: 12 años, 6 meses
Puntos: 0
Respuesta: Fecha con PHP

hola

lo he dejado asi:

<div align="right">Fecha: <?php echo $date_purchased; ?><br>90 dias mas: <?php $fechaDb = $row['$date_purchased'];
$fecha = new DateTime($fechaDb);
$fecha->modify('+90 day');
echo $fecha->format('d/m/Y'); ?>

y me da la fecha de hoy mas 90 dias, no me da la fecha de la base de datos, te anoto aqui la funcion que hace la variable $date_purchased

//get the date from the order table
$date_resource = tep_db_query("select date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
//get the array from the result
$date = mysql_fetch_array($date_resource);
//get the date as a string from the result
$date_purchased = substr($date['date_purchased'], 8, 2) . '/' . substr($date['date_purchased'], 5, 2) . '/' . substr($date['date_purchased'], 0, 4);



muchisimas gracias por tu ayuda