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

Tip: Looking for answers? Try searching our database.

DateTime Format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joel - 12 Jul 2006 23:03 GMT
I'm using access to query a SQL database.  One of the fields in the database
[trddate] uses the datetime format.  If I use the following format in my
query selection I'm ok. BETWEEN '5/1/2006' AND '5/26/2006'.  If I try to use
a form to make a query selection ie. Between [Forms]![Date
Selection]![Starting Date] And [Forms]![Date Selection]![Ending Date] - I get
an error that says your entry cannot be converted to a valid date time value.
Do I have syntax problems within the query and/or do I have format problems
with the unbound box in my form.  The [Starting Date] and [Ending Date] boxes
are formatted as a short date with an input mask of 99/99/0000;0;_
Ofer Cohen - 12 Jul 2006 23:38 GMT
What happen when you try converting the date fields to date?

Between CVDate([Forms]![Date Selection]![Starting Date]) And
CVDate([Forms]![Date Selection]![Ending Date])

Signature

Good Luck
BS"D

> I'm using access to query a SQL database.  One of the fields in the database
> [trddate] uses the datetime format.  If I use the following format in my
[quoted text clipped - 5 lines]
> with the unbound box in my form.  The [Starting Date] and [Ending Date] boxes
> are formatted as a short date with an input mask of 99/99/0000;0;_
Michel Walsh - 12 Jul 2006 23:45 GMT
Hi,

You may try to use

Between CDate( [Forms]![Date Selection]![Starting Date] ) And CDate(
[Forms]![Date Selection]![Ending Date] )

Hoping it may help,
Vanderghast, Access MVP

> I'm using access to query a SQL database.  One of the fields in the
> database
[quoted text clipped - 11 lines]
> boxes
> are formatted as a short date with an input mask of 99/99/0000;0;_
 
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.