M
MarkFrost
Hi
I have a table that lists the date and time that we receive orders, in a
general date format (20/11/2008 14:30:00). I then show if these orders were
despatched or not.
I need to create a query that will only pull in records between certain
dates and times.
Ie. If today is Thursday (20/11/2008), then show me all orders received
between Tuesday (18/11/2008) 16:30:00 and Wednesday (19/11/2008) 16:29:59.
This is kind of where I got to, but I am getting in above my head:
IIF(DatePart("w",Date())=5,Between
DateSerial(Year(Date()),Month(Date()),Day(Date())-2) And
DateSerial(Year(Date()),Month(Date()),Day(Date())-1)
This gives me all of the orders received on the two days, but I don't have
an idea how to build in the time parameters.
I can do this manually by typing the dates/times in, but I need it to be
dynamic. The database will run over night and then email an exception report,
for orders not despatched, through reporting services each morning.
Cheers
Mark
I have a table that lists the date and time that we receive orders, in a
general date format (20/11/2008 14:30:00). I then show if these orders were
despatched or not.
I need to create a query that will only pull in records between certain
dates and times.
Ie. If today is Thursday (20/11/2008), then show me all orders received
between Tuesday (18/11/2008) 16:30:00 and Wednesday (19/11/2008) 16:29:59.
This is kind of where I got to, but I am getting in above my head:
IIF(DatePart("w",Date())=5,Between
DateSerial(Year(Date()),Month(Date()),Day(Date())-2) And
DateSerial(Year(Date()),Month(Date()),Day(Date())-1)
This gives me all of the orders received on the two days, but I don't have
an idea how to build in the time parameters.
I can do this manually by typing the dates/times in, but I need it to be
dynamic. The database will run over night and then email an exception report,
for orders not despatched, through reporting services each morning.
Cheers
Mark