Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dates... 1

Status
Not open for further replies.

EasyOnly

Technical User
Oct 11, 2008
55
0
0
US
Hi All,

I have start date and end date in a table. two different fields. I need to run report with all events that is accosiated with one month. started or ended in a specific month.

I have some events that start in March and end june...
some other events that start in Feb but end in March or june.

I need to run a report with any events that occur in the month. example, March. when I put the criteria in start date, it doesn not include the events that ended in march and started in feb....

Any Suggestions?
 
run a report with any events that occur in the month. example, March
A starting point:
Code:
SELECT ...
FROM ...
WHERE 201003 Between (100*Year([start date]+Month([start date])) And (100*Year([end date]+Month([end date]))

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
So if the query name is Posttrip_qry. in this query I have multiple table witd different field needed for the report.

SELECT.....ProjectID
FROM Posttrip_qry
WHERE 201003 Between (100*Year([start date]+Month([start date])) And (100*Year([end date]+Month([end date]))

I am not sure what is 201003
 
I am not sure what is 201003
You asked for March.

Another way:
WHERE [start date]<=#2010-03-31# AND [end date]>=#2010-03-01#

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top