RecodeMinute function
Replace minutes part of a
TDateTime value with another minute.
Declaration
function RecodeMinute(const AValue: TDateTime; const AMinute: Word)
: TDateTimeArguments
AValue | Date/time to recode. |
AMinute | Minute to replace in
|
Function result
AValue with replaced minute.Description
RecodeMinute replaces the Minute part of the timestamp
AValue
with
AMinute. All other parts of the date/time stamp are left untouched.Errors
If the
AMinute value is not within a valid range (0..59) then
an
EConvertError exception is raised.
See also
- RecodeYear
- RecodeMonth
- RecodeDay
- RecodeHour
- RecodeSecond
- RecodeMilliSecond
- RecodeDate
- RecodeTime
- RecodeDateTime
Example: ex91
Program Example91;
{ This program demonstrates the RecodeMinute function }
Uses SysUtils,DateUtils;
Const
Fmt = 'dddd dd mmmm yyyy hh:nn:ss';
Var
S : AnsiString;
Begin
S:=FormatDateTime(Fmt,RecodeMinute(Now,0));
Writeln('This moment in the first minute of the hour: ',S);
End.An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
