RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DateUtils.RecodeYear Function

Replaces the year for a specified TDateTime value.

Pascal
function RecodeYear(const AValue: TDateTime; const AYear: Word): TDateTime;
C++
TDateTime RecodeYear(const TDateTime AValue, const Word AYear);

DateUtils

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 to 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 Feb 29 on a leap year to a non-leap year), RecodeYear raises an EConvertError exception. 

 

ReplaceDate 

RecodeDateMilliSecond 

RecodeDateSecond 

RecodeDateMinute 

RecodeDateHour 

RecodeDateDay 

RecodeDateYear 

MonthOf 

EConvertError

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!