Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SuperLib 3.50 - function dtdiff() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FUNCTION DTDIFF()

  Short:
  ------
  DTDIFF() Returns difference between dates

  Returns:
  --------
  <nDifference> => days,weeks,months or years between
  dates

  Syntax:
  -------
  DTDIFF(dFirst,dSecond,nUnitType)

  Description:
  ------------
  Calculates difference between <dFirst> and <dSecond>
  in quantity defined by <nUnitType> as:

  1=whole days    2=whole weeks

  3=whole months  4=whole years

  Examples:
  ---------
   dDate     := ctod("10/15/89")
   dDate2    := ctod("10/26/89")
   nDiffdays     := DTDIFF(dDate,dDate2,1)
   nDiffweeks    := DTDIFF(dDate,dDate2,2)
   nDiffmonth    := DTDIFF(dDate,dDate2,3)
   nDiffyears    := DTDIFF(dDate,dDate2,4)

  Source:
  -------
  S_DTDIFF.PRG


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson