July 02, 2008, 10:49 AM
GinnyToday's date - 3
What is the function that I can use in a where clause for today's date minus 3 days?
I am wanting a report that lists anything that has not been updated in the past 3 days. So anything where the last date was todays date - 3.
July 02, 2008, 02:57 PM
Danny-SRL-SET &DAY3=AYMD(&YYMD, -3, 'I8YYMD');
July 02, 2008, 03:48 PM
GinnyI've tried both of the above syntax. When I put the &DAY3 or the &DAYS in my heading I get an error saying (FOC021) THE MAXIMUM HEADING/FOOTING SIZE HAS BEEN EXCEEDED
(FOC009) INCOMPLETE REQUEST STATEMENT
BYPASSING TO END OF COMMAND
July 03, 2008, 01:15 AM
Danny-SRLGinny,
FOC021 usually happens when a double-quote is missing somewhere.
Try
-SET &DAY3=AYMD(&YYMD, -3, 'I8YYMD');
TABLE FILE CAR
HEADING
"Day before yesterday: &DAY3 "
BY COUNTRY
END
July 03, 2008, 01:44 PM
LeahIs the date you're checking a 'smart date'? If so, assuming other criteria limit the data so that everything in the database isn't returned, compute a date that is today - 3, then compute an integer that is the field date minus the computed date, then do a where total on the integer with a selection of LT 0. If I'm thinking right. I tended to avoid dialog manager in my more active days.
July 07, 2008, 11:06 AM
iraquote:
-SET &DAY3=AYMD(&YYMD, -3, 'I8YYMD');
TABLE FILE CAR
HEADING
"Day before yesterday: &DAY3 "
BY COUNTRY
END
Danny: code worked ok by me (as anticipated). Just tested it in our current release (5.3.7).
Ira
aix 533 wf 537