How to get current timestamp from Firebird DBMS Server with Delphi.

procedure TForm1.Button1Click(Sender: TObject);
begin
  FDQuery1.Open('select current_timestamp from rdb$database');
  label1.Caption :=
  formatdatetime('YYYY-MM-DD HH:MM:SS.ZZZ',FDQuery1.FieldByName('current_timestamp').AsDateTime);
end;

This demo show you how to get current date and time from Database Firebird (2.5), Using FireDAC (FDQuery1)

Comments