home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / TEXT / PDX_ALL.ZIP / TI482.ASC < prev    next >
Text File  |  1991-09-11  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  PARADOX                                NUMBER  :  482
  9.   VERSION  :  ALL
  10.        OS  :  PC DOS
  11.      DATE  :  September 11, 1991                       PAGE  :  1/1
  12.  
  13.     TITLE  :  ILLUSTRATION OF THE MATCH FUNCTION
  14.  
  15.  
  16.  
  17.  
  18.   The following script illustrates the use of the MATCH function.
  19.   In this example, we would like to determine how many minutes have
  20.   elapsed between the start time and the end time.  Additionally,
  21.   we would like to assign that value to the [Length of Call] field.
  22.   Also, military time should be used.
  23.  
  24.   ;TIME.SC
  25.  
  26.   echo normal
  27.   EDIT "timetable" is the table being used
  28.   SCAN
  29.      x=MATCH([Start Time],"..:..:..",sh,sm,ss)
  30.      y=MATCH([End Time],"..:..:..",eh,em,es)
  31.      IF (x and y)
  32.      THEN startsec = numval(sh)*3600 + numval(sm)*60 + numval(ss)
  33.           endsec   = numval(eh)*3600 + numval(em)*60 + numval(es)
  34.           [Length of Call] = round((endsec-startsec)/60,0)
  35.      ENDIF
  36.   ENDSCAN
  37.   DO_IT!
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.