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 / March 2006

Tip: Looking for answers? Try searching our database.

query usung datedif function

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
drazlou - 31 Mar 2006 03:44 GMT
This is the sql view of a query that selects records greater than [enter
days] number of days from today. It returns records more than [enter days]
number of days from today but also returns records that are single digit
(1-9)days from today.

SELECT tblPayables.*, tblPayables.paid, DateDiff("d",[invoiceDate],Date())
AS Expr1, [enter days] AS Expr2
FROM tblPayables
WHERE (((tblPayables.paid)=No) AND
((DateDiff("d",[invoiceDate],Date()))>[enter days])) OR
(((tblPayables.paid)=No) AND (([enter days]) Is Null));
tina - 31 Mar 2006 09:51 GMT
try

SELECT tblPayables.* FROM tblPayables
WHERE tblPayables.paid=No AND (tblPayables.invoiceDate > Date()+[enter days]
OR [enter days] Is Null;

hth

> This is the sql view of a query that selects records greater than [enter
> days] number of days from today. It returns records more than [enter days]
[quoted text clipped - 7 lines]
> ((DateDiff("d",[invoiceDate],Date()))>[enter days])) OR
> (((tblPayables.paid)=No) AND (([enter days]) Is Null));
 
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



©2008 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.