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!

Information betwwen Dates

Status
Not open for further replies.

Snookless

Technical User
Mar 17, 2003
34
BR
Hello All,
I am a semi-new user to Crystal and looking for a little help :eek:)
Looking for a formula in Crystal to show information betwwen two dates (Check Dates)....example..."CHKDTE between 01/01/2003 and 03/17/2003"
Thank you
Snookless
 
You pretty much had it, though I take a slightly different approach:

Create a parameter (Insert->Field Object->Right Click Parameter Fiels and select New). Make this a Date type with Range Values selected.

In ther record selection formula (Report->Edit Selection Formula->Record) place something like:

{table.CHKDTE} = {?MyDateParm}

Crystal will generate the sql and pass it to the database.

-k
 
If your dates are static, and you just want to check your date syntax, it's:

CHKDTE between Date(2003,01,01) and Date(2003,03,17)

However, if you're just interested in everything this year, as your criteria seems to suggest, you can use:

CHKDTE in YearToDate

All the best,

Naith
 
When Naithe suggests this:
CHKDTE between Date(2003,01,01) and Date(2003,03,17)
It is what your select expert will look like, when you use the drop down menu.

But when you follow synapsevampire's method to get to the record selection area, (Report->Edit Selection Formula->Record), your formula will look like this:
CHKDTE in Date(2003,01,01) to Date(2003,03,17).

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top