locked
how to calculate no of days in two different dates in CR at run time? RRS feed

  • Question


  • how to calculate no of days in two different dates in CR at run time?

    example:
    recordset of this:
    date, particular, bill no, bill amount, payment amount
    ***********************
    14/05/2008, acc bill,  34, 969.38, 0.00
    23/09/2008, acc bill, 111, 969.38, 0.00
    19/12/2008, acc bill, 253, 977.50, 0.00
    01/01/2009, tax bill, 273, 230.00, 0.00
    08/01/2010, tax bill, 103, 235.00, 0.00

    i am designe a report of this record set.

    my question is:
    14/05/2008 is first transaction and second transaction date of 23/09/2008, I get a this two dates of days and second to third as gooooooo.

    how to calculate days of dates at run time?

     


    R.Shah
    Saturday, July 31, 2010 6:24 AM

Answers

  • DateDiff() is the function you want if you calculate on the report. Now, do you want the number of days from 0 to the date on the record, or between the dates on the records?

    If you want the days between the records, I would calculate that in code on the datatable before giving it to Crystal. It will run much faster and you'll have more control.

    Just my opinion, others may disagree.

    Bernie

     

    • Marked as answer by Harry Zhu Wednesday, August 11, 2010 6:55 AM
    Monday, August 2, 2010 10:43 PM