Page 1 of 1

problems with date calculations

Posted: Tue Oct 21, 2008 11:01 pm
by Glenn Boyce
the other day I got some assistance to subtract some dates. I've changed the date format in my table now from dd/mm/yyyy to dd/mm/yy because its neater and the script won't work because its not the system date. I've looked at reference material and can't find a definition for the dd/mm/yy script I've been using is:

Code: Select all

repeat with n = 1 to the number of lines in gOrders
  
  put item  6 of line n of gOrders into tdate1         -- calculates lateness. Need to do this first so that only those that are late are displayed
put the system date into tdate2
convert tdate1 from system date to seconds
convert tdate2 from system date to seconds
put tdate1 - tdate2 into tdifference
divide tdifference by 60 * 60 * 24
if tdifference >= 0 then exit repeat

ignore

Posted: Tue Oct 21, 2008 11:09 pm
by Glenn Boyce
please disregard this posting. I've got it working. Different problem all together!!