SharePoint Calculated Fields Reference?
I’ve looked for quite a while now for a good reference for what formulas are available to me when I create a calculated column in SharePoint. Today I think I stumbled on the easy answer: Excel.
Here’s a simple example. I wanted to return the year for the Created date. When I just used:
=YEAR([Created])
I got "2,007", but I wanted just "2007". I wasn’t sure of the syntax, so I went into Excel and created the formula:
=TEXT(YEAR(TODAY()),"####")
which gave me what I wanted. (I know, this is so simple that I should have just known.) I took that formula and pasted into my Site Column calculation, replacing TODAY() with [Created], ending up with:
=TEXT(YEAR([Created]),"####")
Exactly what I wanted.
Now, I expect that there are some differences between Excel formulas and SharePoint formulas, but in most cases, I think that this will be a reliable way to build them up, plus Excel gives you nice contextual help when you can’t remember things like "####" means 4 clean digits!
I got it, you have to use ";" not comma !!
So this works : =TEXT(YEAR([Created]);"0000")
=TEXT(YEAR([Created]),"####") does not work in my environment.
I get "The formula contains a syntax error
or is not supported. "
Any clues?