| [Overview][Constants][Procedures and functions][Index] | 
Replace day part of a TDateTime value with another day.
Source position: dateutil.inc line 347
| function RecodeDay( | 
| const AValue: TDateTime; | 
| const ADay: Word | 
| ):TDateTime; | 
| AValue | 
 | Date to recode | 
| ADay | 
 | Day to replace in AValue | 
AValue with replaced day.
RecodeDay replaces the Day part of the timestamp AValue with ADay. All other parts of the date/time stamp are left untouched.
If the ADay value is not within a valid range (1 till the number of days in the month) then an EConvertError exception is raised.
| 
 | Replace year part of a TDateTime value with another year. | |
| 
 | Replace month part of a TDateTime value with another month. | |
| 
 | Replace hours part of a TDateTime value with another hour. | |
| 
 | Replace minutse part of a TDateTime value with another minute. | |
| 
 | Replace seconds part of a TDateTime value with another second. | |
| 
 | Replace milliseconds part of a TDateTime value with another millisecond. | |
| 
 | Replace date part of a TDateTime value with another date. | |
| 
 | Replace time part of a TDateTime value with another time. | |
| 
 | Replace selected parts of a TDateTime value with other values | 
Program Example89; { This program demonstrates the RecodeDay function } Uses SysUtils,DateUtils; Const Fmt = 'dddd dd mmmm yyyy hh:nn:ss'; Var S : AnsiString; Begin S:=FormatDateTime(Fmt,RecodeDay(Now,1)); Writeln('This moment on the first of the month : ',S); End.