Search code examples
sharepointsharepoint-2010sharepoint-2007

Can't set DateTime field to a default value through XML in Sharepoint 2010


I need to set a DateTime field to a default value of one year from the current date. I've used the following XML syntax:

<Default>=DATE(YEAR(Today)+1,MONTH(Today),DAY(Today))</Default>

It's not working and bombs the list containing this field. What am I doing wrong?

Thanks a lot in advance.


Solution

  • Try DefaultFormula instead.

    Deploying column level validations in a feature gives an example using the same formula in a DefaultFormula element instead of Default.