DateUtils.RecodeYear

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From DateUtils.pas

	function RecodeYear(const AValue: TDateTime; const AYear: Word): TDateTime;


Unit: DateUtils

Type: function

Visibility: public

C++ Information

From DateUtils.hpp

	System::TDateTime __fastcall RecodeYear(System::TDateTime AValue, unsigned short AYear);


Unit: DateUtils

Type: function

Description

Replaces the year for a specified TDateTime value.


Call RecodeYear to convert the date/time value specified by AValue with the value obtained by changing the year to AYear. Legal values for AYear range from 1 through 9999.

If the value provided for AYear is not in the legal range, or if the change results in an invalid day of the month (changing February 29 on a leap year to a non-leap year), RecodeYear raises an EConvertError exception.

See Also

Code Samples


Personal tools
Translations
Newest Version