{
SystemTimeToDateTime example
The following code retrieves the current date and time using the Windows 
GetLocalTime API call, and converts this value to a TDateTime value.
} 
function GetCurrentDateTime: TDateTime;
var
  SystemTime: TSystemTime;
begin
  GetLocalTime(SystemTime);
  Result := SystemTimeToDateTime(SystemTime);
end; 
