I have
var timestamp: Longint;
timestamp := Round((Now() - 25569.0 {Unix start date in Delphi terms} ) * 86400);
which I am using as a primary key in some MySql stuff.
But I would also like to format the date/time, like PHP’s date() function does.
Does anyone have a code snippet or URL?
You are looking for
and
functions from DateUtils.pas
TDateTime value can be formatted by FormatDateTime function