Joined: 21 Jan 2011
Online Status: Offline
Posts: 107
Topic: calculate hours difference Posted: 16 Jun 2020 at 9:41am
hi
I need to be able to calculate the difference in hours form 2 separate date and time fields
fields
Date 1
Time 1
Date 2
Time 2
I attempted using the following formula however I dont believe the date and time are stored in the date field.
local numbervar tt := datediff('h',date1,date2);
local numbervar d := truncate(tt/24,0);
local numbervar h := remainder(tt,24);
local stringvar tt_d := totext(d,0,"") + ' days ';
local stringvar tt_h := totext(h,0,"") + ' hours';
local stringvar tt_string := tt_d & tt_h
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum