Error calculating date

  • 12 September 2017
  • 7 replies
  • 19 views

Badge +8

Hello. I am getting the following message in SP2013. "Error calculating date. The added or subtracted value results in an un-representable DateTime. Parameter name: months". I am querying my list to pull a current date field into a variable date/time and then using the calculate date action to subtract months/years from said date to get me what the date would have been and storing this date into a date/time variable and then updating a "new date" field with this date. Not sure why I am getting this error and the question similar to this one here in the forum was never really answered. Thanks in advance.


7 replies

Badge +8

For visual clarification.

Badge +8

The one that is failing out in the history is one that I am subtracting a year from the original due date. Could it be I am going too far back?

Userlevel 5
Badge +14

have you checked what's the real value of  'Due Date Old' prior it enters date calculation action?

can you write it to log and check?

Badge +16

how are you populating variable "Due Date Old"?

Badge +8

Ok I was able to determine that the issue was I had a field with a blank due date so and was erroring out everything because of it. I got it working. Thanks!

Badge +8

I got it working. One field in my Due Date column was blank so then it was failing out before it could update the ones that did have a due date. Rookie error.

Badge +16

yeah be sure to check that before you do the calculation (run if or something) to cater for that exact issue.  happy.png

Reply