RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.RecodeTime Function

Replaces the time portion of a specified TDateTime value.

Pascal
function RecodeTime(const AValue: TDateTime; const AHour: Word; const AMinute: Word; const ASecond: Word; const AMilliSecond: Word): TDateTime;
C++
TDateTime RecodeTime(const TDateTime AValue, const Word AHour, const Word AMinute, const Word ASecond, const Word AMilliSecond);

DateUtils

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 to 24. If AHour is 24, AMinute, ASecond, and AMilliSecond must all be 0. 

AMinute can range from 0 to 59. 

ASecond can range from 0 to 59. 

AMilliSecond can range from 0 to 999. 

If the values provided for AHour, AMinute, ASecond, and AMilliSecond do not fall in the valid range, RecodeTime raises an EConvertError exception. 

 

ReplaceTime 

RecodeDateMilliSecond 

RecodeDateSecond 

RecodeDateMinute 

RecodeDateHour 

RecodeDateMonth 

RecodeDateYear 

EConvertError 

RecodeDate

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!