System.DateUtils.RecodeHour

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function RecodeHour(const AValue: TDateTime; const AHour: Word): TDateTime;

C++

extern DELPHI_PACKAGE System::TDateTime __fastcall RecodeHour(const System::TDateTime AValue, const System::Word AHour);

Properties

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

Description

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

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 through 24. If AHour is 24, the minutes, seconds, and milliseconds of AValue must all be 0. AHour can also be RecodeLeaveFieldAsIs.

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

See Also

Code Examples