Replaces the date portion of a specified TDateTime value.
function RecodeDate(const AValue: TDateTime; const AYear: Word; const AMonth: Word; const ADay: Word): TDateTime;
TDateTime RecodeDate(const TDateTime AValue, const Word AYear, const Word AMonth, const Word ADay);
DateUtils
Call RecodeDate to convert the date/time value specified by AValue with the value obtained by changing the year to AYear, the month to AMonth, and the day of the month to ADay.
AYear must fall between 1 and 9999 (inclusive).
AMonth can range from 1 to 12.
Legal values for ADay depend on the month represented by AMonth. (For example, if AMonth is 1, ADay can range from 1 to 31; if AMonth is 2, ADay can range from 1 to 28 or 1 to 29, depending on the year; and so on.)
If the values provided for AYear, AMonth, and ADay do not represent a valid date, RecodeDate raises an EConvertError exception.
ReplaceDate
RecodeDateMilliSecond
RecodeDateSecond
RecodeDateMinute
RecodeDateHour
RecodeDateMonth
RecodeDateYear
EConvertError
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|