By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,757 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

Date Range Parameter - Including timestamps

P: 2
Hi all new to this site so looking for some help.

I am working in Access 2002, using a select query. I am trying to use a date range parameter to allow the users to end the start date and end date i.e 1/1/08 and 31/1/08, the field name is Transaction Date and some dates have timestamps and some dont.

Parameter >=[Enter Start Date] And <=[Enter End Date]

When entering the last date the query, if the transaction date record has a time stamp of 31/1/08 10:23 this is not being returned.

How can I use a parameter to include these records, so that when entering the last date it still picks up records with timestamps.

Thanks Heaps
Aug 26 '08 #1
Share this Question
Share on Google+
2 Replies

Expert 2.5K+
P: 3,532
In the Query Grid for the query, you need to create a calculated field to only return the Date part of the Transaction Date:

Expand|Select|Wrap|Line Numbers
  1. DateOnly:DatePart("m",[Transaction Date])& "/"& DatePart("d",[Transaction Date])& "/"& DatePart("yyyy",[Transaction Date])
then run your parameters against this calculated field, DateOnly, instead of the actual Transaction Date field.

Linq ;0)>
Aug 26 '08 #2

P: 2
HI Linq

Thanks for the quick response.

I did try this code and yes did work, however when I add the parameter information it brought out all records.

Found another function DateValue, tried this and it worked quicker.

Thanks for you help
Aug 28 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.