I am trying to create a column that calculates a column's status based on date.

I currently have =IF([Start Date & Time] - [today's date]7, Major, Minor)

However, for whatever reason SharePoint keeps saying that its a syntax error.

Can anyone help me correct this issue?

  • Do you live/work in the Us or anywhere else? You can get a syntax error for using commas instead of semicolons and the other way around as the separators are different for some regions. Try to change all the commas in your calculation (,) to a semicolon instead(;). Commented Aug 16, 2016 at 13:00
  • I live in the U.S.
    – CSHARE
    Commented Aug 16, 2016 at 13:02

1 Answer 1


I think I was helping you with your workflow yesterday haha, but I also did calculations with dates for a sign-in log where I wanted a view of all logs by work week so it would say "Week of mm/dd/yyyy" and list all sign-ins.

Anyways, this may help you with your calculations. I did =TEXT(Date+(2-WEEKDAY(Date)),"mm/dd/yyyy"), the 2-WEEKDAY is something I had to play around with until it showed the Monday of the workweek. You can try doing something like that, or use the msdn guide on calculated columns for SP2010 at https://msdn.microsoft.com/en-us/library/office/bb862071(v=office.14).aspx

If I were to write your calculation, I'd write =IF([Start Date & Time]-[Today]<=7,"Major","Minor")

Notice that your Major and Minor need to be strings.

If that doesn't work, you can try doing something like I did for the "Week of" calculation

EDIT: I just read the msdn article and looks like =DATEDIF will do the trick to calculate the difference in days, but you will probably need to throw an IF outside of the DATEDIF to produce the "answer" (Major, Minor) to your condition

  • Yes, you did and it worked, anyway I put in your formula and Sharepoint told me this error message: The formula contains a circular reference (the calculated column refers to itself). You must remove or change the circular reference
    – CSHARE
    Commented Aug 16, 2016 at 12:55
  • I had a concern with your column because of the inclusion of date AND time, not sure if this is throwing any problems when comparing with just a date. Anyways, read the msdn article, I think it can help you a lot! Good luck
    – user54272
    Commented Aug 16, 2016 at 12:56
  • 1
    So sorry but [Today] throws an error in calc columns, it can only be used in views, apparently Today() works as a function in calc columns. This guide can help you sharepoint.stackexchange.com/questions/151144/…
    – user54272
    Commented Aug 16, 2016 at 13:40

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.