Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / April 2008

Tip: Looking for answers? Try searching our database.

Date question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ryan.fitzpatrick3@safeway.com - 17 Apr 2008 18:53 GMT
I have a date field, I want to lookback 15 days from today for all
PO's, in the criteria what would I put in there? I know theres a
dateadd is there a datesubstract or something along the lines of that?
It will always be 15 days. Thanks

ryan
raskew - 17 Apr 2008 19:56 GMT
>I have a date field, I want to lookback 15 days from today for all
>PO's, in the criteria what would I put in there? I know theres a
>dateadd is there a datesubstract or something along the lines of that?
>It will always be 15 days. Thanks
>
>ryan
Two examples:

x = date() - 15

x = dateadd("d", -15, date())

HTH - bob
Klatuu - 17 Apr 2008 19:58 GMT
>= DateAdd("d", -15, Date)

To subtract, just use a negative number
Signature

Dave Hargis, Microsoft Access MVP

> I have a date field, I want to lookback 15 days from today for all
> PO's, in the criteria what would I put in there? I know theres a
> dateadd is there a datesubstract or something along the lines of that?
> It will always be 15 days. Thanks
>
> ryan
ryan.fitzpatrick3@safeway.com - 17 Apr 2008 22:04 GMT
Thanks, that was it, I knew it was something along the lines of that!!

> >= DateAdd("d", -15, Date)
>
[quoted text clipped - 9 lines]
>
> > ryan
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.