Topic: compute date/time

hi , how compute start date/time and end date/time

tnx god speed ... and please snapshot the procedure please

Re: compute date/time

You need compute date/time in script or SQL query?

Dmitry.

Re: compute date/time

both tnx smile

Re: compute date/time

Calculated fied to calculate the difference between fields TimeFinish and TimeStart

((strftime('%s', TimeFinish) - strftime('%s', TimeStart)) / 3600)  || " hours  " ||
(((strftime('%s', TimeFinish) - strftime('%s', TimeStart)) - ((strftime('%s',TimeFinish) - strftime('%s', TimeStart)) / 3600) * 3600) / 60)  || " mins"


Script
compute difference between DateTimePicker1 and DateTimePicker2

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
var
   dt: TDateTime;
begin
     dt := Form1.DateTimePicker2.DateTime - Form1.DateTimePicker1.DateTime;
     ShowMessage(IntToStr(Trunc(dt)) + ' days');
end;
Dmitry.

Re: compute date/time

can u snapshot how to input how input that tnx

Re: compute date/time

please ask a specific question that you need to do?

Dmitry.

Re: compute date/time

@DriveSoft
instead of showing message how to put the calculation answer in edit field.

JUST LEARNING, O GOD HELP ME.

Re: compute date/time

Asifmute wrote:

@DriveSoft
instead of showing message how to put the calculation answer in edit field.

procedure Form1_Button1_OnClick (Sender: string; var Cancel: boolean);
var
   dt: TDateTime;
begin
     dt := Form1.DateTimePicker2.DateTime - Form1.DateTimePicker1.DateTime;
     Form1.Edit1.Text := IntToStr(Trunc(dt)) + ' days';
end;
Dmitry.

Re: compute date/time

@DRIVESOFT
THANK YOU VERY MUCH.

JUST LEARNING, O GOD HELP ME.