JDS2018 1 Posted December 15, 2018 Hi Can you help to on belowStart Date and time : 1/1/2018 3:30:00 PM End Date and time : 2/1/2018 4:35:00 PM I Need to Get Result as belowExample Answer Should be1 Day 1 Hour 5 Mints Share this post Link to post
Uwe Raabe 2057 Posted December 15, 2018 program Project458; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.TimeSpan; var span: TTimeSpan; begin span := TTimeSpan.Subtract(EncodeDate(2018,1,2)+EncodeTime(16,35,0,0), EncodeDate(2018,1,1)+EncodeTime(15,30,0,0)); Writeln(Format('%d Day(s) %d Hour(s) %d Minute(s)', [span.Days, span.Hours, span.Minutes])); Readln; end. 1 Share this post Link to post