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 / November 2007

Tip: Looking for answers? Try searching our database.

Between 2 dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Debbie - 30 Nov 2007 17:10 GMT
I'm new to access, but have Oracle exprience.  What is the syntax for the
where clause 'between date1 and date2'
In Oracle I would say date_column between
to_char(to_date('01/01/2007,'mm/dd/yyyy')) and
to_char(to_date('01/01/2007,'mm/dd/yyyy'))
mscertified - 30 Nov 2007 17:41 GMT
If you are talking about a date column, you can use
Date >= Date1 AND Date <= Date2  - OR-
Date between Date1 and Date2

If using literal dates use syntax #mm/dd/yy#

-Dorian

> I'm new to access, but have Oracle exprience.  What is the syntax for the
> where clause 'between date1 and date2'
> In Oracle I would say date_column between
> to_char(to_date('01/01/2007,'mm/dd/yyyy')) and
> to_char(to_date('01/01/2007,'mm/dd/yyyy'))
John Spencer - 30 Nov 2007 17:46 GMT
Between #2007-01-01# and #2007-01-01#

You could also use the format mm dd yyyy  (US-Centric)

BETWEEN #1/1/2007# and #12/31/2007#

Signature

John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

> I'm new to access, but have Oracle exprience.  What is the syntax for the
> where clause 'between date1 and date2'
> In Oracle I would say date_column between
> to_char(to_date('01/01/2007,'mm/dd/yyyy')) and
> to_char(to_date('01/01/2007,'mm/dd/yyyy'))
 
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.