Name

diff_date — returns the difference between 2 dates

CALLING SEQUENCE

num=diff_date(lastdate,firstdate)

PARAMETERS

Input

• lastdate = last date

• firstdate = first date

Output

• num = the number of observations between the 2 dates

DESCRIPTION

Computes the number of observations between 2 dates.

EXAMPLE

d = diff_date('1995a','1985a')
// gives 10
d = diff_date('1987q4','1985q2')
// gives 10 too
d = diff_date('72m1','83m12')
// gives  -143
 
               

AUTHOR

Eric Dubois 2002