Hi jk,
I'm not sure how your EndDate is being populated, but perhaps it or other values are not populated before saving? I would try a couple of things...
- Copy your existing calc into a calc on a text field, and wrap it in a Try/Catch so you can return your value or any error into the text field in-situ. Test so see what's happening.
- Try replacing some of your referenced values (e.g., "instance.EndDatetime") with hard-coded values and see what makes a difference.
With both of these methods, experiment with both Before/After Save to see where they vary.
-Brian