Only Date or Date and Time Allowed issue in infopath 2010 forms

Posted on 2013-09-04
Medium Priority
Last Modified: 2014-01-27
I have created two date fields(Date only type) field1 and field2  in sharepoint list.Field1 default value is now() and field2 value is concat(substring-before(field1, "-"), "-", substring-before(substring-after(field1, "-"), "-") + 1, "-", "10") but I am getting red box around the field2 with ""Only Date or Date and Time Allowed" message.

The same formula for field2 is working without any issues for form libraries. I am having issue only for sharepoint list forms.

Can anybody help me out to resolve this issue?

Any help would be appreciated.
Question by:aaedla
  • 2
LVL 28

Assisted Solution

by:Clay Fox
Clay Fox earned 750 total points
ID: 39465127
I get the error on field 1, should use today() rather than now() since it is a date only.

it helps to use calculated value controls to troubleshoot the formulas since you can see the raw text of each potion.

Author Comment

ID: 39465204
Thank you for your help. We cannot use today function for sharepoint lists.
LVL 28

Accepted Solution

Clay Fox earned 750 total points
ID: 39465260
You need to make sure that the field in the list matches your form.

Otherwise make your field a Date/Time type.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
Watch the video of Kernel Migrator for SharePoint, which demonstrate the process easily of migration from SharePoint to SharePoint, OneDrive for Business & Google Drive servers, Public Folder to SharePoint, File Server to SharePoint. The tool has va…
From store locators to asset tracking and route optimization, learn how leading companies are using Google Maps APIs throughout the customer journey to increase checkout conversions, boost user engagement, and optimize order fulfillment. Powered …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question