Connecting Tech Pros Worldwide Help | Site Map

No Of Days

KEVIN97810
Guest
 
Posts: n/a
#1: Nov 13 '05
hello to all,
I have a date field in my table (last, first, address,
contact, Date) and i want to write a select statement example
based on the date field. Give me 30 days, 30 to 90, 90 to 100 from that date
field
when i clicked the option group.

Select of of the following

[ ] 30 days
[ ] 30 to 90 days
[ ] 90 to 100 days

than i will use this query to run my reports.

thanks



fredg
Guest
 
Posts: n/a
#2: Nov 13 '05

re: No Of Days


On 10 Jan 2005 02:46:52 GMT, KEVIN97810 wrote:
[color=blue]
> hello to all,
> I have a date field in my table (last, first, address,
> contact, Date) and i want to write a select statement example
> based on the date field. Give me 30 days, 30 to 90, 90 to 100 from that date
> field
> when i clicked the option group.
>
> Select of of the following
>
> [ ] 30 days
> [ ] 30 to 90 days
> [ ] 90 to 100 days
>
> than i will use this query to run my reports.
>
> thanks[/color]

As criteria on the Date Field in your query use one of the below.
For 30 days:
Between [DateField] and DateAdd("d",30,[DateField])
For 30 to 90 days:
Between DateAdd("d",30,[DateField]) and DateAdd("d",90,[DateField])
For 90 to 100 days:
Between DateAdd("d",90,[DateField]) and DateAdd("d",100,[DateField])
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Closed Thread