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

Date error on Diff-Date



A number of our sqrs are getting the following error:

(SQR 1921) Bad date mask starting at: '-MON-YYYY'.

I have the troublesome Diff-Date line of code commented out.  The report runs 
fine w/out it.  The situation:  We recently moved from a PS 7 to PS 8.16 and 
from Oracle 7 to 8.16.  We figure it has something to do w/ how the dates are 
stored in the database.  All sqrs were running fine in the old environment.  We 
have been cleaning up the conversion, and the reports are the last thing on the 
list so everything else is in order in the environment.

This is the snippet of code where I am receiving the error:

begin-procedure Process-Main2
  let #tot1 = 0
begin-SELECT !distinct
c1.deptid
   move &a1.n_start_dt  to              $START_DT1
   LET $SYSDATE = SUBSTR($REPORTDATE,7,4) || '-' || SUBSTR($REPORTDATE,1,2) || 
'-' ||SUBSTR($REPORTDATE,4,2)

   !DO Diff-Date($SYSDATE,$START_DT1,#yy_diff,#MM_diff,#DD_diff)   ((HERE IS 
THE ERROR))

   let #DD_DIFF         =               #DD_DIFF +1
   ADD #DD_diff                 TO              #SUBTOTAL_DT
   ADD #DD_diff                 TO              #GRANDTOTAL_DT
d1.name                         (+1,  {col1})
b1.n_rate_rank                          (0,  {col2})
d1.emplid                       (0,  {col3}) edit xxx-xx-xxxx
a1.n_start_dt                   !(0,  {col4})
e1.descr
....

Jody