It looks like you're new here. Sign in or register to get started.
local procedure TestDateTime() var DateTime1: DateTime; DateTime2: DateTime; Duration1: Duration; begin DateTime1 := CreateDateTime(20090101D, 080000T); // January 1, 2009 at 08:00:00 AM DateTime2 := CreateDateTime(20090505D, 133001T); // May 5, 2009 at 1:30:01 PM Duration1 := DateTime2 - DateTime1; Message(format(Duration1)); //124 days 4 hours 30 minutes 1 second Duration1 -= 1000; Message(format(Duration1)); //124 days 4 hours 30 minutes end;
Answers
If you wish to remove 1 second, just subtract 1000 from the Duration variable.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!