If the element you are trying to set has a schema datatype of "date", then
the value must be in the YYYY-MM-DD format based on the ISO 8601 standard.
Likewise, a "dateTime" field would be stored in YYYY-MM-DDTHH:MM:SS format.
You control how a date field is formatted for display by setting the Format
for the text box or expression box used to show the date. When a valid date
is entered in m/d/yyyy format, InfoPath parses the text box entry and saves
it into the field in YYYY-MM-DD format; however, it will display it on the
form using whatever format you select in the Properties dialog for the
control.

Signature
David Dean
Sr. Member Technical Staff
Insource Technology Corp.
> I am using the following script to calculate a new date in InfoPath 2003,
> however, the output date format is in yyyy-mm-dd instead of the mm/dd/yyyy I
[quoted text clipped - 33 lines]
>
> }
Bobby - 01 Aug 2007 19:30 GMT
When I change the formatting for the text box it changes for the control as
well. At that point I get nil errors in the script.
> If the element you are trying to set has a schema datatype of "date", then
> the value must be in the YYYY-MM-DD format based on the ISO 8601 standard.
[quoted text clipped - 44 lines]
> >
> > }
Bobby - 01 Aug 2007 19:52 GMT
Ok, now I feel stupid, I was not using an expression box. I was using a text
box control. Thanks for the help.
> If the element you are trying to set has a schema datatype of "date", then
> the value must be in the YYYY-MM-DD format based on the ISO 8601 standard.
[quoted text clipped - 44 lines]
> >
> > }