Forum Discussion

DirkRuana's avatar
DirkRuana
Qrew Captain
6 years ago

Elapsed days invoice aging

Well.... having some "developmental opportunities" again.

Trying to calculate days an invoice is aging after being sent (believe it or not we have net 90 with one customer).  I have two fields:

1.) [Days Aging] - Numeric formula
2.) [Date Invoice Sent to Client] - Date Field

Help provided is always sooooo appreciated!

------------------------------------------------------------------------------


formula syntax error

There are extra characters beyond the end of the formula.


ToDays(Today()-Todate([Date Invoice Sent To Client]))  ,





  • AustinK's avatar
    AustinK
    Qrew Commander
    Is that the whole formula? The formula looks correct other than the comma on the end.

    What issues are you having with it? If there is more to it as the comma suggests post that part because this looks right to me.
  • Try this:
    ToDays( Today()-[Date Invoice Sent to Client] )

    Notes:
    - You had an extra comma at the end
    - Since [Date Invoice Sent to Client] is already a Date field, you don't need to convert it with the "ToDate" function

    Hope this helps!
    • AlexCertificati's avatar
      AlexCertificati
      Qrew Cadet
      Don't need to, but still works. It could also be a date/time field, which will not work without todate().
    • XavierFan's avatar
      XavierFan
      Qrew Cadet
      Actually - I get an error in my test app if I use ToDate with a Date field - "Formula error -- Bad or missing arguments in function call".  

      This is assuming that [Date Invoice Sent to Client] is a Date field.

      I'm surprised it worked for you in your test app?  I'm not seeing the same thing for some reason.
    • AlexCertificati's avatar
      AlexCertificati
      Qrew Cadet
      You are right, Xavier. I stand corrected. ToDate([date field]) does not work.

      I think this confirms my guess that OP's [Date Invoice Sent To Client] is probably a date/time field.
  • Formula looks fine to me. Works in my test app. Pardon the question - you've reproduced it here with an errant trailing comma - is that character in your formula?

    EDIT to clarify: this formula works if [Date Invoice Sent To Client] is a date/time or text field. It will NOT work if that field is a simple date field. However, if that were the issue you'd be seeing this error:
    "Formula error -- Bad or missing arguments in function call"
    rather than 
    "Formula syntax error -- There are extra characters beyond the end of the formula"

    Thanks to @Xavier Fan for narrowing that down