Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

2 Answers 2

up vote 2 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
add comment

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
add comment

Your Answer

 
discard

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.