Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Filter in Query not working??

Status
Not open for further replies.

sandingdude

IS-IT--Management
Jun 26, 2002
109
0
0
US
I have a query that filters certain dates using the command Between [Enter Begin Date] And [Enter End Date]. When I enter the dates to run the filter the query runs, but I have dates outside of the scope. Any ideas? Thank you in advance.
 



Hi,

Are these REAL DATES?

If you can CONVERT you date to a LONG Number, using the CLng function, it is a REAL DATE. Otherwise you only have a STRING that represents a date to some extent.

OR...

if you are converting your REAL DATES to Strings in a "format" that does not colate properly. For instance, converting a REAL DATE to a string in the format mm/dd/yyyy will NOT yield the results you desire.

You can use a string, however, if you format your string in YEAR, MONTH, DAY sequence.

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Skip

I figured out why the date filter was not working correctly. It was becase I had other criteria specified in another field to filter "ES" and "NS". This creates another problem for me. Because I am trying to filter new sales and existing sales when I specify the dates after the ES and NS filters have been applied the date filter "Between [Enter Begin Date] And [Enter End Date]" does not work. It displays all the ES and NS but doesn't take the date in consideration at all.

Any ideas?

THank you in advance.

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top