Ver Mensaje Individual
  #8  
Antiguo 02-10-2015
wilcg wilcg is offline
Miembro
 
Registrado: abr 2014
Posts: 107
Reputación: 11
wilcg Va por buen camino
A ver entonces la forma correcta de guardar una fecha y hora en SQLite sería asi:
Código Delphi [-]
  with Query1 do
  begin
    Close;
    SQL.Clear;
    SQL.Add('Insert Into clientes (codigo,cliente,fecha_registro,hora_registro)');
    SQL.Add(' Values (:codigo,:cliente,:fecha_registro,:hora_registro)');
    Parambyname('codigo').Value := txtCodigo.Text;
    Parambyname('cliente').AsString := txtCliente.Text;
    Parambyname('fecha_registro').Value := FormatDateTime('YYYY-MM-DD', Date);
    Parambyname('hora_registro').Value := FormatDateTime('HH:MM:SS', Time);
    ExecSQL;
  end;
Responder Con Cita