The RecodeHour function replaces the hour for the specified TDateTime value.
The function converts the date/time TDateTime value specified by AValue,with the value obtained by changing the hour of the day within AValue to the hour specified with AHour.
Valid accepted values for AHour range from 0 to 24. If AHour is 24, then the values for the minutes, seconds, and milliseconds must all equal zero (0).
If the value provided for AHour is not within the allowable range so it does not represent a valid hour, then RecodeHour raises an exception error.
Declaration: Function RecodeHour(const AValue: TDateTime; const AHour: Word): TDateTime;