System.SysUtils.TrySystemTimeToDateTime

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function TrySystemTimeToDateTime(const SystemTime: TSystemTime; out DateTime: TDateTime): Boolean;

C++

extern DELPHI_PACKAGE bool __fastcall TrySystemTimeToDateTime(const _SYSTEMTIME &SystemTime, /* out */ System::TDateTime &DateTime);

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Converts a system time value into a TDateTime value.

Call TrySystemTimeToDateTime to convert a value from Windows 32's TSystemTime (MSDN) (Delphi) or _SYSTEMTIME (C++) API format to a TDateTime value. TrySystemTimeToDateTime is available on Windows only. TrySystemTimeToDateTime differs from SystemTimeToDateTime in that it returns "False" instead of raising an EConvertError exception if the provided SystemTime is invalid.

See Also

Code Examples