Volatile function error for SharePoint calculated field current date

 

Today's Issue: Volatile function error for SharePoint calculated field current date

While creating calculated column to find date difference, I encountered this error. Here I have provided the resolution to fix it,

  1. Create a new column called Today (Single line of text).
  2. Create a calculated column, name it anything you want, say 'CurrentDate'.
  3. In the formula, insert the column you created previously 'Today'.
  4. Set the data type to 'Date and Time'.
  5. Set the Date and Time format to 'Date Only'. You can even select Date & Time if you would want to use hours/minutes as well.
  6. Now delete the 'Today' column you created in first step. Don't worry, just go ahead.
  7. Add the 'CurrentDate' column to your view and check the value.
  8. You should see today's date in there.
  9. Modify the formula as required, you can use the column Today just like the function [Today] without any issues.
Same approach could also be used for [Me], if there is a need for calculated column that involves it.

Comments

Popular posts from this blog

Power BI Refresh Issue: unable to convert the value '' from the source data type 'VT_BSTR' to the expected data type 'VT_I8.

Run Powershell script on Remote Computer/Server

wsp not getting deployed in all servers