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

Date Diff question

Status
Not open for further replies.

bld21

Technical User
Mar 1, 2010
49
US
I am using crystal 2008 and I have 2 date fields:{payment.pmt_eff_dte},{detail.enter_dte}.

I want to only see records if the {payment.pmt_eff_dte} is within 90 days of the {detail.enter_dte}.

I am new so any help is greatly appreciated!!!

Bruce
 
I also want to add the fields are

DateTime
 
If the Select Expert, choose "New" and then the field you want to use (in this case {payment.pmt_eff_dte})
using the dropdown, select "is in the period", then select 'Aged0to30Days'
Click the 'Show Formula' button, then the 'Formula Editor' button.
Locate the line you just added (it should be "{{payment.pmt_eff_dte} in Aged0to30Days"
Place a parenthesis before the table/field, put an 'OR' after the Aged0to30Days. add the table/field again, and after it type 'in Aged31to60Days OR' add table/field again 'in Aged61to90days')
So when you are done it should look like this:

(
{payment.pmt_eff_dte} in Aged0to30Days
OR
{payment.pmt_eff_dte} in Aged31to60Days
OR
{payment.pmt_eff_dte} in Aged61to90Days
)


By keeping it in the parenthesis, as above, you can continue to add other selection criteria outside the parenthesis.
 
int(datediff("d",{payment.pmt_eff_dte},{detail.enter_dte})) <= 90

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top