System.DateUtils.RecodeTime
Delphi
function RecodeTime(const AValue: TDateTime; const AHour, AMinute, ASecond, AMilliSecond: Word): TDateTime;
C++
extern DELPHI_PACKAGE System::TDateTime __fastcall RecodeTime(const System::TDateTime AValue, const System::Word AHour, const System::Word AMinute, const System::Word ASecond, const System::Word AMilliSecond);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.DateUtils.pas System.DateUtils.hpp |
System.DateUtils | System.DateUtils |
Description
Replaces the time portion of a specified TDateTime value.
Call RecodeTime to convert the date/time value specified by AValue with the value obtained by changing the hour to AHour, the minute to AMinute, the second to ASecond, and the milliseconds to AMilliSecond.
AHour can range from 0 through 24. If AHour is 24, AMinute, ASecond, and AMilliSecond must all be 0.
AMinute can range from 0 through 59.
ASecond can range from 0 through 59.
AMilliSecond can range from 0 through 999.
If the values provided for AHour, AMinute, ASecond, and AMilliSecond do not fall in the valid range, RecodeTime raises an EConvertError exception.
See Also