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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Greater Than Or Equal To

Status
Not open for further replies.

bigmerf

MIS
Oct 4, 2002
247
US
I'm writing a report that has date criteria and two parameters that the user enters in a begin and end date. I want the results on the report to display all records that fall within that date range, INCLUDING the dates that are entered.

When selecting the "Between" option in the select expert I get the following:
Code:
{phs.phs_d} in {?BeginDate} to {?EndDate}

Where {?BeginDate} = 11/1/09
and {?EndDate} = 1/22/10

The problem with this is it does not give me the records that exist with a phs_d = 1/22/10

I tried editing the formula myself and changing it so the it reads:
Code:
{phs.phs_d} >= {?BeginDate} and {phs.phs_d} <= {?EndDate}

Yet it reverts back to the "in" clause like first entered. How can I used a greater than or equal to select expert statement to compare dates?
 
If it's a date parameter used with a datetime field, then it should still be returning the values on the end date, but you could also use:

{phs.phs_d} >= {?BeginDate} and
{phs.phs_d} < {?EndDate} + 1

-LB
 
Yeah, just as I received your email response I was changing the data type of the parameter fields. You were correct in that they were setup as DateTime rather than just Date. I changed them to be just Date and it worked just fine.

Sorry for the trouble but that you for your prompt response!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top