Foros del Web » Programando para Internet » PHP »

Problema con fechas... parece facil ?

Estas en el tema de Problema con fechas... parece facil ? en el foro de PHP en Foros del Web. TENGO AQUI ESTE CODIGO QUE FUNCIONA BIEN, IMPRIME TODAS LAS FECHAS Y EN EL FORMATO QUE DESEO, PERO... SIEMPRE EMPIEZA CON LA FECHA DE HOY ...
  #1 (permalink)  
Antiguo 06/05/2008, 12:09
 
Fecha de Ingreso: febrero-2008
Mensajes: 409
Antigüedad: 16 años, 2 meses
Puntos: 2
Pregunta Problema con fechas... parece facil ?

TENGO AQUI ESTE CODIGO QUE FUNCIONA BIEN, IMPRIME TODAS LAS FECHAS Y EN EL FORMATO QUE DESEO, PERO... SIEMPRE EMPIEZA CON LA FECHA DE HOY "$STARTDATE=MKTIME();" ... QUE PASARIA SI YO QUIERO EMPEZAR CON UNA FECHA PRE-ESTABLECIDA ? DIGAMOS UNA VARIABLE ? Gracias por sus respuestas ....... !

************************************************** *************


$startdate = mktime();
$enddate = strtotime("+10 years", $startdate);

for($i=$startdate; $i<=$enddate; $i=strtotime("+1day",$i))
{
$linea=date("Y-m-d", $i);
echo ($linea);
}
  #2 (permalink)  
Antiguo 06/05/2008, 12:42
 
Fecha de Ingreso: febrero-2008
Mensajes: 409
Antigüedad: 16 años, 2 meses
Puntos: 2
Re: Problema con fechas... parece facil ?

perdón por las mayúsculas... se me pegó el "caps lock" y me di cuenta al final... ;)
  #3 (permalink)  
Antiguo 06/05/2008, 19:18
 
Fecha de Ingreso: febrero-2008
Mensajes: 409
Antigüedad: 16 años, 2 meses
Puntos: 2
Exclamación Re: Problema con fechas... parece facil ?

nadie ? por favor necesito con urgencia... ayuda !!!!
  #4 (permalink)  
Antiguo 06/05/2008, 20:16
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Re: Problema con fechas... parece facil ?

http://php.net/mktime
  #5 (permalink)  
Antiguo 06/05/2008, 22:51
 
Fecha de Ingreso: febrero-2008
Mensajes: 409
Antigüedad: 16 años, 2 meses
Puntos: 2
Re: Problema con fechas... parece facil ?

Muchas gracias.... funcionó !
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:42.