[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

DateAdd / StrToDate problem.



Hi all!

Hoping someone can help.

I am trying to use the dateadd as seen below but are
getting the following errors.

Any tips would be greatly appreciated,
thanx.


  Let $MyMonth  = '200111'

  Let $TempDate = $MyMonth || '01'
  Let $TempDate = strtodate($TempDate, 'YYYYMMDD')
  Let $TempDate = DateAdd($TempDate, 'month', -6)
  Let $HalfYear = DateToStr($TempDate, 'YYYYMM')



Error on line 78:
   (SQR 4045) Function or operator 'dateadd' requires date argument.

Error on line 79:
   (SQR 4045) Function or operator 'datetostr' requires date argument.

Errors were found in the program file.

SQR: Program Aborting.