RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.RecodeHour Function

Replaces the hour of the day for a specified TDateTime value.

Pascal
function RecodeHour(const AValue: TDateTime; const AHour: Word): TDateTime;
C++
TDateTime RecodeHour(const TDateTime AValue, const Word AHour);

Call RecodeHour to convert the date/time value specified by AValue with the value obtained by changing the hour of the day to AHour. Legal values for AHour range from 0 to 24. If AHour is 24, the minutes, seconds, and milliseconds of AValue must all be 0. 

If the value provided for AHour is not in the legal range, RecodeHour raises an EConvertError exception. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!