Ver Mensaje Individual
  #1  
Antiguo 21-12-2010
Avatar de richy08
richy08 richy08 is offline
Miembro
 
Registrado: may 2007
Ubicación: Bucerias, Nayarit Mexico
Posts: 529
Reputación: 20
richy08 Va por buen camino
Crear cadena aaaa-mm-ddThh:mm:ss

Buenas trades compañeros esoty tratando de crear la fecha con el formato
aaaa-mm-ddThh:mm:ss lo hago con el siguiente codigo
Código Delphi [-]
  MiFecha := now(); //07-05-09 23:37
  DecodeDate(MiFecha,Year,Month,Day);
  DecodeTime(MiFecha,Hour,Min,Sec,Msec);
 Fecha:= IntToStr(Year)+'-'+IntToStr(Month)+'-'+IntToStr(Day)+'T'+inttostr(Hour)+':'+inttostr(Min)+':'+inttostr(Sec);

pero dicho codigo tiene un error por que cuando una cifra es <9 al hacer el
inttostr(Sec) el 09 lo convierte a 9 ahi alguna funcion que me respete el 0 a la izquierda del 9

saludos
Responder Con Cita