Returning Dates using today's date + 5

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am doing an order schedule and would like to see all orders less than/equal
to today's date + 5 Weekdays. I have it working for today's date + 5 days but
not for 5 weekdays.
My current sql is: <=Date()+5

Thanks
 
PPCO said:
I am doing an order schedule and would like to see all orders less
than/equal to today's date + 5 Weekdays. I have it working for
today's date + 5 days but not for 5 weekdays.
My current sql is: <=Date()+5

Thanks

I think this from the help file may help.


Uses the DateAdd function to display a date that is 10 days before the value
of the PromisedDate field.

=DateAdd("y", - [PromisedDate])10
 
Joseph Meehan said:
PPCO said:
I am doing an order schedule and would like to see all orders less
than/equal to today's date + 5 Weekdays. I have it working for
today's date + 5 days but not for 5 weekdays.
My current sql is: <=Date()+5

Thanks

I think this from the help file may help.


Uses the DateAdd function to display a date that is 10 days before the value
of the PromisedDate field.

=DateAdd("y", - [PromisedDate])10

Or, more correctly:

=DateAdd("y", -10, [PromisedDate])
 
I don't think I explained clearly enough what I was trying to do. I want to
be able to see orders that that are scheduled for the next 5 weekdays. I also
need to be able to see open orders before today's date (because some have not
been completed and shipped). My current SQL returns orders for the next 5
days (including weekends) but not for just the next 5 weekdays. Thanks!

Douglas J Steele said:
Joseph Meehan said:
PPCO said:
I am doing an order schedule and would like to see all orders less
than/equal to today's date + 5 Weekdays. I have it working for
today's date + 5 days but not for 5 weekdays.
My current sql is: <=Date()+5

Thanks

I think this from the help file may help.


Uses the DateAdd function to display a date that is 10 days before the value
of the PromisedDate field.

=DateAdd("y", - [PromisedDate])10

Or, more correctly:

=DateAdd("y", -10, [PromisedDate])
 
PPCO,
Do you have any transactions on Sat or Sun?
If not, cvouldn't you just ask for the next seven days.
That would pick up the next 5 workdays, with no data reported for Sat and Sun.

Have you looked at the Weekday function? You could ask for seven days ahead, and
filter out those dates where the Weekday is NOT 1 or 7.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


PPCO said:
I don't think I explained clearly enough what I was trying to do. I want to
be able to see orders that that are scheduled for the next 5 weekdays. I also
need to be able to see open orders before today's date (because some have not
been completed and shipped). My current SQL returns orders for the next 5
days (including weekends) but not for just the next 5 weekdays. Thanks!

Douglas J Steele said:
Joseph Meehan said:
PPCO wrote:
I am doing an order schedule and would like to see all orders less
than/equal to today's date + 5 Weekdays. I have it working for
today's date + 5 days but not for 5 weekdays.
My current sql is: <=Date()+5

Thanks

I think this from the help file may help.


Uses the DateAdd function to display a date that is 10 days before the value
of the PromisedDate field.

=DateAdd("y", - [PromisedDate])10

Or, more correctly:

=DateAdd("y", -10, [PromisedDate])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top