Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 28th, 2004, 10:30 AM
Authorized User
Join Date: Jan 2004
Location: Frederick, MD, USA.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dates in queries

I am trying to select a recordset based on a date/time field. The parameter I want to use is the current date without the time. I have tried using the Date() function and typing in a specific date. Even though that date is present in the table I am querying the query returns a blank recordset unless I copy and paste the exact date, which includes the time as well. I don't want my query to be that specific though. I am using the short date format in my table but that does not affect the data itself. Any suggestions?
  #2 (permalink)  
Old January 28th, 2004, 10:41 AM
Friend of Wrox
Join Date: Jul 2003
Location: Houston, Texas, USA.
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts


Create a new field in your query using the following (change the field name to be reflective of yours):

DateField: Left([DateTimeStampField],InStr([DateTimeStampField]," "))

Pass your parameter to this column as it is only looking at the date value.


Beth M
  #3 (permalink)  
Old January 28th, 2004, 11:24 AM
Authorized User
Join Date: Jan 2004
Location: Frederick, MD, USA.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts

I ended up using DateOnly: DateValue([FREEZE_DATE]) in my calculated field with the date as the criteria. It works perfectly. Thank you so much for your help.
  #4 (permalink)  
Old February 5th, 2005, 03:37 AM
Registered User
Join Date: Feb 2005
Location: chennai, tamil nadu, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to acpsiva Send a message via Yahoo to acpsiva

hello everybody,

i am using access for my application. now i am trying to draw charts based on the data in db. now the problem is how i can get the data's between the specified month and year. is there any function to get the data's in the range of month.

thank u.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining two Queries arholly Access 1 January 16th, 2007 06:40 PM
Combining Queries or results from 2 queries Ford SQL Server 2000 24 November 7th, 2005 08:54 PM
Parameters in Queries al0468 Access 2 September 17th, 2003 02:08 AM
Queries xzvi0r Access 5 September 8th, 2003 10:03 AM
XSLT queries arvin XSLT 1 August 7th, 2003 11:25 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.