[Overview][Constants][Procedures and functions] |
Replace milliseconds part of a TDateTimevalue with another millisecond.
Source position: dateutil.inc line 341
function RecodeMilliSecond( |
const AValue: TDateTime; |
const AMilliSecond: Word |
):TDateTime; |
AValue |
|
Date/time to recode |
AMilliSecond |
|
Millisecond to replace in AValue |
AValuewith replaced millisecond.
RecodeMilliSecondreplaces the millisecond part of the timestamp AValuewith AMilliSecond. All other parts of the date/time stamp are left untouched.
If the AMilliSecondvalue is not within a valid range (0..999) then an EConvertErrorexception is raised.
|
Replace year part of a TDateTimevalue with another year. |
|
|
Replace month part of a TDateTimevalue with another month. |
|
|
Replace day part of a TDateTimevalue with another day. |
|
|
Replace hours part of a TDateTimevalue with another hour. |
|
|
Replace minutse part of a TDateTimevalue with another minute. |
|
|
Replace seconds part of a TDateTimevalue with another second. |
|
|
Replace date part of a TDateTimevalue with another date. |
|
|
Replace time part of a TDateTimevalue with another time. |
|
|
Replace selected parts of a TDateTimevalue with other values |
Program Example93; { This program demonstrates the RecodeMilliSecond function } Uses SysUtils,DateUtils; Const Fmt = 'dddd dd mmmm yyyy hh:nn:ss.zzz'; Var S : AnsiString; Begin S:=FormatDateTime(Fmt,RecodeMilliSecond(Now,0)); Writeln('This moment, milliseconds stripped : ',S); End.