Ver Mensaje Individual
  #2  
Antiguo 09-05-2007
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.556
Reputación: 25
egostar Va camino a la fama
Hola sinocarlos

Pues si que está raro, el problema creo yo esta en la instrucción CAST, porque Delphi toma bien los valores.

Hice estas dos pruebas y efectivamente, '2007/05/08' nos da 39210.

Código Delphi [-]
procedure TForm1.BitBtn1Click(Sender: TObject);
var
  fechastr: String;
  date: TDateTime;
begin
  fechastr := '2007/05/08';
  date := encodedate(strtoint(copy(fechastr,1,4)),
          strtoint(copy(fechastr,6,2)),
          strtoint(copy(fechastr,9, 2)));
  ShowMessage(FloattoStr(Date)+'-->'+DatetoStr(date));
end;

procedure TForm1.BitBtn2Click(Sender: TObject);
begin
  ShowMessage(DatetoStr(39210));
end;


Salud OS.
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita