number of days between two dates

Hi everyone


İ want to find number of days between two dates


i used this formulas


[[ErpWorkOrder.İsteme Tarihi]-[ErpWorkOrder.GRCK DOSYA]]


but I get an error warning


How can i find the number of days

Comments

  • Hello!

    The expression [[Field1] - [Field2]] returns a TimeSpan object (the difference between two DateTime values), and the extra outer square brackets around the nested fields sometimes cause parsing errors. To display the number of days between two dates as an integer, use the .Days property (or the built-in DateDiff function):

    [((DateTime)[ErpWorkOrder.Request Date] - (DateTime)[ErpWorkOrder.GRCK FILE]).Days]

    Or use the built-in FastReport .NET function:

    [DateDiff([ErpWorkOrder.GRCK FILE], [ErpWorkOrder.Request Date]).Days]

This discussion has been closed.