[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Odd Error: Month must be between 1 and 12
Hi
I get the error:
Error on line 1377:
(SQR 1925) Month must be between 1 and 12.
Line 1377 is as follows (all on one line):
show 'invoicenum: ' &invoicenum ' - Invoicedate: ' &invoiceDate
The problem is a NULL value for &invoiceDate in the database.
select invoicenum, invoicedate from invoice
where invoicenum = '1052' and invoicedate is null;
This returns:
INVOICENUM INVOICEDATE
========== ====================
1052
1 ROW SELECTED
showing that invoicenum = '1052' is NULL.
However, if the following code is run:
if isnull( &invoiceDate )
show 'invoicenum: ' &invoicenum ' is NULL'
else
show 'invoicenum: ' &invoicenum ' - Invoicedate: ' &invoiceDate
end-if
the else statement is executed for invoicenum = '1052' and the program
terminates at:
invoicenum: 1052 - Invoicedate:
Other fields including date fields do not give problems.
If anyone has any suggestion as to the problem, I would be most grateful.
Andrew