?
Solved

System Date

Posted on 2000-03-30
4
Medium Priority
?
138 Views
Last Modified: 2010-05-02
What is the sintax that I can use to compare a Date Column from access to the System Date ? Like this :

adodc1.recordset.open "select * from table where field1 < date"

When I use two date columns no problems.

Thanks in advance for any help
0
Comment
Question by:tomcruisew
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Expert Comment

by:vbWayne
ID: 2669556
MSDN:  datediff function
0
 
LVL 20

Expert Comment

by:hes
ID: 2669704
Dim CurrentDate
CurrentDate = Format(Now,"mm/dd/yyyy")

adodc1.recordset.open "select * from table where field1 < #" & CurrentDate & "#"

0
 
LVL 4

Accepted Solution

by:
wesleystewart earned 60 total points
ID: 2670185
Date() will return the current system date:

adodc1.recordset.open "select * from table where field1 < #" & Date() & "#"

Wes
0
 
LVL 9

Expert Comment

by:cymbolic
ID: 2670382
Be aware that datetime fields will assume you mean just after midnight on the day you compare.  So if you want to include items on that day, you need to say something like #12/31/99 23:59# or just say <#1/1/00#
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question