Connecting Tech Pros Worldwide Help | Site Map

No Of Days

  #1  
Old November 13th, 2005, 07:07 AM
KEVIN97810
Guest
 
Posts: n/a
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



  #2  
Old November 13th, 2005, 07:07 AM
fredg
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count the no of days between 2 dates ndeeley answers 9 May 20th, 2009 11:03 AM
Calculating No. of Days excluding Public Holiday jjkeeper answers 4 August 27th, 2008 02:35 PM
No of Days in a Month Vajrala Narendra answers 1 June 9th, 2008 10:11 AM
Adding no. of Days to the Current Date. nagarwal answers 4 August 9th, 2007 07:37 AM
Avery No of days late query jai answers 1 September 6th, 2006 07:32 AM