Hi there
I need to be able to create a calculated field in a query which determines if only the month and year of a date field in one table is between between the month and year of the [start date] and [end date] fields in another table. I am OK using Between to evaluate the whole date but need something which will allow the query to process the following example:
[Start date]: 13/3/05
[End date]: 22/7/06
[Date to evaluate]: 4/3/05
In this instance I would want the Iif statement to return a true message because it would only look at the month and the year component of the [date to evaluate] field so even though technically the [date to evaluate] field is not between the [start date] and [end date], it is from a point of view of its month and year values. Is this possible?
I need to be able to create a calculated field in a query which determines if only the month and year of a date field in one table is between between the month and year of the [start date] and [end date] fields in another table. I am OK using Between to evaluate the whole date but need something which will allow the query to process the following example:
[Start date]: 13/3/05
[End date]: 22/7/06
[Date to evaluate]: 4/3/05
In this instance I would want the Iif statement to return a true message because it would only look at the month and the year component of the [date to evaluate] field so even though technically the [date to evaluate] field is not between the [start date] and [end date], it is from a point of view of its month and year values. Is this possible?