Mysql timestamp in milliseconds
Posted: Wed 24 May 2017 00:22
How to get the current time from the MYSQL server in milliseconds? I only get it in whole seconds.
Discussion forums for open issues and questions concerning database tools, data access components and developer tools from Devart
https://forums.devart.com/
Code: Select all
var
ms: Integer;
begin
UniQuery.SQL.Text := 'SELECT NOW(3)';
UniQuery.Open;
ms := UniQuery.Fields[0].AsSQLTimeStamp.Fractions;Code: Select all
procedure TForm7.Button7Click(Sender: TObject);
var
ms : Integer;
q :TUniQuery;
begin
q:=TUniQuery.Create(nil);
q.Connection:=MainCon;
q.SQL.Text := 'SELECT NOW(3)';
q.Open;
ms := q.Fields[0].AsSQLTimeStamp.Fractions;
Memo1.Lines.Add(IntToStr(ms));
q.Free;
end;Yes it returns 0ViktorV wrote:Please provide the exact versions of the used MySQL Server and IDE. Also specify whether the ms variable value equals 0.