InfoPath not recgnizing date format from XML - InfoPath Dev
in

InfoPath Dev

InfoPath not recgnizing date format from XML

Last post 12-07-2009 09:05 AM by chris.sprague. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-07-2009 08:33 AM

    InfoPath not recgnizing date format from XML

    Hey All --

     Wasn't sure where to post this one...

     I've manually created InforPath XML files from a VBScript. When I open up the the XML file in infopath, the template looks good, all the data is there but InfoPath tells me the date field is invalid (red box around the control).

    The date field in the XML looks like:

    <my:DateOpen>10/20/2009</my:DateOpen>

    Like I said, when I open up the file in InfoPath, the control is populated but says it's invalid. I can manually retype or just copy and paste the date back into the control and it will accept it - problem is, I'd have 900+ to do that way!!!). I've tried changing the date format attribute on the control from mm/dd/yyy to none (use XML value) but with the same result.

     Has anyone seen this before?

     Thanks for any help anyone could provide!

    - Chris

  • 12-07-2009 08:39 AM In reply to

    Re: InfoPath not recgnizing date format from XML

    The date in the XML needs to be in yyyy-MM-dd format. You'll need to change your XML files.... try opening one in notepad, changing the format, saving, and then opening with your template -- you'll see the date will then pass validation.

    Of course, if you are okay with your date not being a Date data type in your form, you can also change the DateOpen field in the form template to a string data type. Personally, I'd change the dates to the correct format.

    Hilary Stoupa

  • 12-07-2009 09:05 AM In reply to

    Re: InfoPath not recgnizing date format from XML

    Hilary -- You're an all-star!!!
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.