Expression - Today minus Date Created RRS feed

  • Question

  • Hi

    I am in the process of building a report within SQL Reporting Services. I am struggling with an expression and would appreciate any assistance.

    I need to subtract Todays date from the Date that the Item was created in order to create a column which displays the number of days that the Item has been open.

    I have tried the following:
    =FormatDateTime(Today) - (FormatDateTime(Fields!Created.Value))
    =Now - (Fields!Created.Value)
    =Today() - Fields!Created.Value

    I receive an error message stating: Operator "-" is not defined for types 'Date' and 'Object'.

    Thanks very much

    Thursday, October 24, 2013 7:17 AM


  • You need to use datediff


    • Proposed as answer by Uri DimantMVP Thursday, October 24, 2013 7:47 AM
    • Marked as answer by TonySim Thursday, October 24, 2013 8:29 AM
    Thursday, October 24, 2013 7:46 AM