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

Tag: sharepoint , sharepoint-2010 , sharepoint-2007 Author: pol0123456 Date: 2012-04-10

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:


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

Thanks a lot in advance.

Best Answer

Try DefaultFormula instead.

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


Thank you so very much. It worked like a charm. Basically, the final thing markup was the following: <DefaultFormula>=DATE(YEAR(Today)+1,MONTH(Today),DAY(Today))</DefaultFormula> Would you also be so kind as to try to answer another question that I've posted at click me? Again, I really appreciate it.