sexta-feira, 17 de agosto de 2012 00:08
Good Day All,
I have an ORDERS table.
The need is to look @ all orders placed for this year ( Between Jan 1, 2012 and Now() ).
But only between 8pm and 6:30am.
Any ideas on how I could write this?
Thanks for your assistance!
Todas as Respostas
sexta-feira, 17 de agosto de 2012 00:17
It sounds like you need 2 conditions in your Query like:
WHERE ([OrderDate] Between DateSerial(Year(Date()), 1, 1) And Now())
AND ( (TimeValue([ORDERDATE]) >= #20:00#) Or (TimeValue([ORDERDATE]) <= #06:30#) )
If you don't have any future-dated orders, you can change the Between... condition to simpler Greater Than... condition.
Van T. Dinh
segunda-feira, 20 de agosto de 2012 20:18
Will try it out this week & see if I can get that to work.
quarta-feira, 22 de agosto de 2012 06:04
I think Van's reply is your goal's answer. Do you try it?