Subtracting Days from a Date

P

pcap

Between [Forms]![Hours Query]![End Date] And ([Forms]!
[Hours Query]![End Date]-14)

This worked before I did the Upsize wizard and loaded my
tables on SQL Server. Now it does not work. When I take
out the 14 it returns data. Basically I am taking a date
from a form and getting the date range of that date and 14
days before. Any ideas?
 
D

Dale Fye

How about:

Between [Forms]![Hours Query]![End Date]
And DateAdd("d", -14, [Forms]![Hours Query]![End Date])

--
HTH

Dale Fye




This worked before I did the Upsize wizard and loaded my
tables on SQL Server. Now it does not work. When I take
out the 14 it returns data. Basically I am taking a date
from a form and getting the date range of that date and 14
days before. Any ideas?
 

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

Top