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 & Time function filter

Status
Not open for further replies.

ste4en

Technical User
Aug 1, 2001
69
I am trying to filter by date and not getting the right answer I think the problem is that the field I am filtering is a date time field.

1/16/2006 6:30:00 AM

I am asking for data greater than 1/16/06 but it is including 1/16/06 I am assuming because my filter is 1/16/06 (at 0:00:00) so that above record would be greater.

How do I filter for the date without having to put the time in.

thanks

Steve
 
I am trying to filter by date
How you do that ?
Tip: > is not the same as >=

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 




Hi,

If your data also has TIME values, your filter ought to be either
Code:
 > 1/16/06 23:59:59
or
Code:
 >= 1/17/06


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

>DateValue(TheDate)+1


DateValue(#2006-1-16 6:30:00#) will return 2006-1-16 without the time

Then adding 1 to a date field/variable value or the return value of a date conversion function will add a day, so you get: 2006-1-17
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top