1 Reply Latest reply: Dec 5, 2012 7:20 AM by Robert Angel RSS

    Add days to date column using Evaluate

    roney31
      Hi All,

      I have below two expression are implemented in the report column.But result is giving odbc error.What was wrong in this expression:

      1.The below expression is giving odbc error. Here the column "Asset Account Balance(AAB)"."Depreciation Started Date" is in decimal value.

      13-MONTH(Evaluate('to_date(%1,%2)' as date ,CAST("Asset Account Balance(AAB)"."Depreciation Started Date" AS character(10)),'MM/DD/YYYY'))

      2. The below expression is adding the days to date column. "Asset Account Balance(AAB)"."AAB Life Months" is decimal value.
      YEAR(Evaluate('to_date(%1,%2)+ABS("Asset Account Balance(AAB)"."AAB Life Months"*30.42)' as date ,CAST("Asset Account Balance(AAB)"."Depreciation Started Date" AS character(10)),'MM/DD/YYYY'))


      Can you please give your quick response!!!!! Thanks in advance
        • 1. Re: Add days to date column using Evaluate
          Robert Angel
          Hi,


          What is your error message?

          Also - have you tried running the elements of your formula in order to ascertain exactly which piece is not working - frequently doing this can also make it more obvious why the total function fails as you find the result of an inner function may not be providing an outer function with the value that you expected.

          You can then feed the result of the inner queries in as explicit values to see if the result is consistent.


          regards,

          Robert.