I have two files and want compare yours compilation dates for a future update.
Suppose that the new file have a date: 20/09/2019, and old file a date: 19/09/2019. How compare these two date on same format (dd/mm/yyyy)?
var
UpDate, OldDate: string;
begin
UpDate := '20/09/2019';
OldDate := DateToStr(FileDateToDateTime(FileAge(IncludeTrailingBackslash(ExtractFilePath(Application.ExeName)) + 'test.exe'))) // 19/09/2019
if UpDate > OldDate then
begin
// Do something
end;
end;