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

in Infopath i set the default value of a due date field to "today()". the format however when i load the form shows "Year-Mo-Day" format (however is correct data), and it displays a red box around the field with ""Only Date or Date and Time Allowed". If i just select the right date from the date picker it works fine. Also, i did set the Format of the Date field to be "03-12-2013" format.

share|improve this question
    
i found this but i don't understand why Infopath would give you a Date math function that improperly formats for a Date field. theyhttp://nabeeldotnet.blogspot.com/2011/11/infopath-2010-date-picker-problem-w‌​hen.html –  April Drake Apr 11 '13 at 0:55
    
or the same InfoPath 2010 - Date Picker problem when SetVal from CodeBehind in more human-friendly format –  Gennady Vanin Novosibirsk Apr 11 '13 at 4:08
add comment

2 Answers

This happens when your regional settings on sharepoint server is different from those on client machine in which you edit template in Infopath Designer.

This can happen even if your "client machine" is the same as server machine due to differences in regional settings in operating system (Windows) and settings of sharepoint server.

Infopath Designer and Filler use regional settings from local machine Windows while Sharepoint server uses its own settings.

I think it was discussed before "Date picker show format differently when publish as a web-based form in SharePoint Library" though your situation is probably (because you did not mention any details), "aggravated" because you dealing with Infopath form of type/compatibility Sharepoint List Form in which Infopath form is rigidly locked to underlying sharepoint list.

share|improve this answer
    
How is this an answer?? it doesn't solve the problem. Also it isn't even the explanation for the problem. the explanation is from Геннадий Ванин Новосибирск yesterday. in which case, i still need a solution. is there a way from within infopath to set dates to the Date Picker field in a way that the format is M-D-Y. it APPEARS not, but this is hard to accept. –  April Drake Apr 12 '13 at 18:32
add comment
up vote 2 down vote accepted

The solution is to use the "now()" function instead of "today()" function.

share|improve this answer
    
thanks man, I was stuck. –  AmitKB Sep 12 '13 at 11:17
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.