I'm linking to a Microsoft site which gives commonly used formulas for SharePoint calculated fields. Which I recently used to subtract months from a date. I started by simply subtracting a rough number of days from my date field but that isn't exactly the same as subtracting months since months have different numbers of days. So instead of using
=IF([Go Live]<>"",[Go Live]-243,"")
I used
=IF([Go Live]<>"",DATE(YEAR([Go Live]),MONTH([Go Live])-8,DAY([Go Live])),"")
Which nicely subtracted 8 months from the field regardless of what the date was. This same concept can be used to add/subtract years and/or days. Here's the complete list of
Examples of common formulas.
No comments:
Post a Comment