transforms a date into a number
num=date2num(dat,indw)
dat = a date string
indw = 'w' if the date is given as a day date but corresponds to a week (optional)
num = the numerical representation of the dates
d=date2num('1985q4') // returns the numerical representation of the quarterly date '1985q4' d=date2num('2002a') // returns the numerical representation of the yearly date '2002a'. d=date2num('97m12') // returns the numerical representation of the monthly date '97m12'. d=date2num('2002/03/15','w') // returns the numerical representation of the daily date '2000/03/15'.