SP_DTDIFF

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

 

2 responses to “SP_DTDIFF

  1. Pingback: SP Date Functions | Viva Clipper !

  2. Pingback: SP Functions | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.