Forum Discussion
Aqua-holic
Aug 22, 2022Copper Contributor
Non-developer here, how do I write SharePoint Calculations for:
I am counting number of days a project is On Hold (a yes/no column) with calculated column: Hold Days =DATEDIF([Hold Begin Date],TODAY(),"d") My question - When project is not On Hold, I want "d" ...
- Aug 22, 2022
You could try below formula:
=IF(AND([Hold End Date]>0,[Hold Begin Date]>0),DATEDIF([Hold Begin Date],[Hold End Date],"d"),IF([Hold Begin Date]>0,DATEDIF([Hold Begin Date],TODAY(),"d"),"0"))
Make sure that you are using correct internal name of both the column in formula. Get hint from this link if you don't know how to find internal name of the column
Official Documentation: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/bb862071(v=office.14)
Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community
kalpeshvaghela
Aug 22, 2022Steel Contributor
You could try below formula:
=IF(AND([Hold End Date]>0,[Hold Begin Date]>0),DATEDIF([Hold Begin Date],[Hold End Date],"d"),IF([Hold Begin Date]>0,DATEDIF([Hold Begin Date],TODAY(),"d"),"0"))
Make sure that you are using correct internal name of both the column in formula. Get hint from this link if you don't know how to find internal name of the column
Official Documentation: https://docs.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/bb862071(v=office.14)
Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community
- Aqua-holicAug 23, 2022Copper Contributorkalpeshvaghela Thank you not only for the solution, but also the helpful hints.