How to add 6 days to a start date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I accept a StartDate and then add 6 days to come up with "Between
[Start Date] and <the StartDate+6>"

Will always add 6 days to the startdate.
 
jsccorps said:
How do I accept a StartDate and then add 6 days to come up with "Between
[Start Date] and <the StartDate+6>"

Will always add 6 days to the startdate.

You just about have it...

BETWEEN [Enter Start Date] and [Enter Start Date] + 6

If the two parameter markers have exactly the same text in them the user is only
prompted once.
 
Ofer the second suggestion

Select * from TableName Where DateField Between [Start Date] And
DateAdd("d",6,[Start Date])

Worked fine. Thanks

Now, how do I show these two dates in a Report? I can get the [Start Date]
to appear ok. But, having trouble getting the DateAdd("d",6,[Start Date]) to
appear.
For example, I want From 6/12/2005 To 6/18/2005 to show on the report.



Ofer said:
Try this

Select * from TableName Where DateField Between [Start Date] And [Start
Date] + 6

Or
Select * from TableName Where DateField Between [Start Date] And
DateAdd("d",6,[Start Date])

--
Please respond to the group if your question been answered or not, so other
can refer to it.
Thank you and Good luck



jsccorps said:
How do I accept a StartDate and then add 6 days to come up with "Between
[Start Date] and <the StartDate+6>"

Will always add 6 days to the startdate.
 
Try this

Select * from TableName Where DateField Between [Start Date] And [Start
Date] + 6

Or
Select * from TableName Where DateField Between [Start Date] And
DateAdd("d",6,[Start Date])
 
Set the ControlSource of your TextBox to:

= "From " & Format([Start Date], "m/d/yyyy") & " To " &
Format(DateAdd("d",6,[Start Date]), "m/d/yyyy")

(type as one line in the ControlSource Property).
 
Back
Top