System.DateUtils.RecodeMonth

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function RecodeMonth(const AValue: TDateTime; const AMonth: Word): TDateTime;

C++

extern DELPHI_PACKAGE System::TDateTime __fastcall RecodeMonth(const System::TDateTime AValue, const System::Word AMonth);

Properties

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

Description

Replaces the month of the year for a specified TDateTime value.

Call RecodeMonth to convert the date/time value specified by AValue with the value obtained by changing the month of the year to AMonth. Legal values for AMonth range from 1 through 12. AMonth can also be RecodeLeaveFieldAsIs.

If the value provided for AMonth does not represent a valid month, or if the change results in an invalid day of the month (for example trying to change January 31 to February 31), RecodeMonth raises an EConvertError exception.

See Also

Code Examples