If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date query problem
I need to query a field based on date alone. The data also contains the time
component. When I query as dd/mm/yyy (i.e. #04/19/2000#) I get no results - if I include time as well it works. I need to query just on date though. I have tried formatting the query date column with no success. Is there another way to go about this? Thanks |
#2
|
|||
|
|||
Date query problem
Add a calculated field to your query:
JustTheDate: DateValue([FieldName]) Then use your criterion on this field. -- Ken Snell MS ACCESS MVP "CCT" wrote in message ... I need to query a field based on date alone. The data also contains the time component. When I query as dd/mm/yyy (i.e. #04/19/2000#) I get no results - if I include time as well it works. I need to query just on date though. I have tried formatting the query date column with no success. Is there another way to go about this? Thanks |
#3
|
|||
|
|||
Date query problem
Yep, that did it, TYVM
"Ken Snell [MVP]" wrote: Add a calculated field to your query: JustTheDate: DateValue([FieldName]) Then use your criterion on this field. -- Ken Snell MS ACCESS MVP "CCT" wrote in message ... I need to query a field based on date alone. The data also contains the time component. When I query as dd/mm/yyy (i.e. #04/19/2000#) I get no results - if I include time as well it works. I need to query just on date though. I have tried formatting the query date column with no success. Is there another way to go about this? Thanks |
#4
|
|||
|
|||
Date query problem
Method one: Change the criteria to
=#04/19/2000# AND #04/20/2000# If you are using a parameter then use the something like =[What day?] AND =DateAdd("d",1,[What day?] ) Method two: Use the dateValue function Make a calculated column Field: JustTheDate: DateValue([YourDateField]) Criteria: #04/19/2000# "CCT" wrote in message ... I need to query a field based on date alone. The data also contains the time component. When I query as dd/mm/yyy (i.e. #04/19/2000#) I get no results - if I include time as well it works. I need to query just on date though. I have tried formatting the query date column with no success. Is there another way to go about this? Thanks |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Copy Cat Ain't Working | shep | Setting Up & Running Reports | 15 | September 12th, 2005 05:14 PM |
Help again from Ken Snell (Query) | Randy | Running & Setting Up Queries | 22 | August 29th, 2005 08:15 PM |
Here's a shocker | Mike Labosh | General Discussion | 2 | October 26th, 2004 05:04 PM |
Taher | Setting Up & Running Reports | 1 | August 31st, 2004 09:07 PM | |
Aggregating Date Data into Weeks and Quarters | Roger | Running & Setting Up Queries | 3 | July 11th, 2004 05:56 PM |