I provision a list in SharePoint 2010 with two date fields: one for a start date and one for an end date. I would like to add a third column for the duration.

Naturally, I could add a calculated column which uses the DATEDIF function. The problem is that my date fields get their names from a resource file. It appears that calculated columns refer to other columns by their display name. Is there any way around that? I'd hate to have to add an event receiver just for this.

1 Answer 1


Just to share, I have found a workaround for this issue here: http://www.hezser.de/blog/archive/2008/10/12/programmatically-creating-a-spfieldcalculated.aspx

In short, you make the calculated column like this:

  • Save the value of web.Locale
  • Set web.Locale to English
  • Create the calculated column using English formula
  • Set web.Locale to the original value

That way, you can approach formulas as always being in English. Saves a LOT of headache

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.