Link to home
Start Free TrialLog in
Avatar of lrollins
lrollinsFlag for United States of America

asked on

Due from current Date

I need to write a report that will show me orders that are due in 2 weeks from the date the report was run.  Any suggestions?
Avatar of Mike McCracken
Mike McCracken

Try this as the select statement

I assume you want to see any order that is due in the next 2 weeks

{DateOrderDueField} >= CurrentDate  and {DateOrderDueField} <= CurrentDate  + 14

If you want to see orders due 2 weeks from today then use

{DateOrderDueField} = CurrentDate  + 14

mlmcc
@mlmcc: Just a thought on the first condition ensemble ... unfortunately, IMHO, that would sort out overdue orders, which I suppose is not lrollins's intention, isn't it ? ;-)

I'd think that

{DateOrderDueField} <= CurrentDate  + 14
would perfectly do what's intended.
Could be but he specifically asked for orders due in 2 weeks.

mlmcc
SOLUTION
Avatar of Frank Helk
Frank Helk
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You had a good thought.  I interpreted to mean those listed as due in the next 2 weeks.  I didn't think about things that are still open and past due.

mlmcc
Avatar of lrollins

ASKER

Sorry, I should have explained myself more.  Yes I need to see what is due in 2 weeks (but also past due) and the second formula works fine.  My other problem now is that some really old orders are still open and I really don't need to see all of those.  How would I make it only see back say 6 months?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks....  That did the trick.  This helped me find a lot of orders that shouldn't have been open in the first place.
You probably should have given some credit to frankhelk's comment since he gave the original filter.  My comment simply modified it so some data was ignored.

mlmcc
I don't think there is a way to change it.  Sorry my head isn't screwed on right today.
Thanks for sharing the glory ... and the points ;-)