REF: Calculating Time/Date Duration

Hi There

I have a computed date created field which gives Date and Time a system is logged as ‘down’.

I also have an editable Date plus an editable Time field whereby users enter the date and time

a system was ‘up’.

I want to cal;culate difference between the two but am having trouble bringing the editable date and time fields together for the formula.

If it was all computed it wouldn’t be a problem, it’s having the date and time separated

that is a pain but there is noway round this, it has to be manually entered.

Appreciate any prointers,

Rgds

Sue

Subject: REF: Calculating Time/Date Duration

Sue,

I created a form with four fields, startDate as date only, startTime as time only and then the two others for enddate and end time.

Ithen put this into a button to get the number of seconds and it works like a champ.

startDateTime := @Date( @Year( startdate);@Month( startdate);@Day( startdate);@Hour( startTime);@Minute( startTime);0);

endDateTime := @Date( @Year( enddate);@Month( enddate);@Day( enddate);@Hour( endTime);@Minute( endTime);0);

REM “Diff will now be the number of seconds”;

diff := (endDateTime - startDateTime);

@Prompt( [OK];“The number of Seconds is”;@Text( diff))

John

Subject: RE: REF: Calculating Time/Date Duration

Just one little thing here: @TimeMerge (new in ND6) would be neater than @Date.