SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I made an InfoPath 2010 form using a SharePoint list template. The SharePoint list has a ReceivedDate field of DateOnlyType which I would like to set using the today() or now() on a "Set a field's" value rule.

Upon running the rule on a button click I get an error "Only date or date and time is allowed". How can I set this field without changing it from DateOnlyType to a TextType field?

share|improve this question
up vote 4 down vote accepted

You are using the the today() formula, it will return that error you are talking about. For SharePoint fields you have to use now().

share|improve this answer
Both today() and now() didn't work when I tested it in the office SharePoint server. At home, the now() function works. I'll need to test this again on other SharePoint test servers at the office. – Jimbo Alba Oct 27 '11 at 15:12
Thats strange, let me know if its some other issue :) – Anders Aune Oct 27 '11 at 21:35
It's working now when I tested it again. Hopefully, I will not encounter that problem again. Thank you. – Jimbo Alba Oct 28 '11 at 15:38

Try formatting the value 'Today()' or 'now()' in infopath using substring function to the date format you require in the list.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.