How to set date format (DD/MM/YYYY) on infopath form through XSD? - InfoPath Dev
in

InfoPath Dev

How to set date format (DD/MM/YYYY) on infopath form through XSD?

Last post 10-12-2010 12:28 AM by rahulbabar. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 10-09-2010 02:28 AM

    How to set date format (DD/MM/YYYY) on infopath form through XSD?

    Hi All,

    Is there any way to set date format (DD/MM/YYYY) in XSD file used to design infopath form?

    Thanks,

    Rahul Babar

    ================================================
    ASP.NET, C#, Sharepoint 2007/2010/2013/SP Online, Infopath 2007/2010/2013 Admin/Developer
  • 10-11-2010 07:36 AM In reply to

    Re: How to set date format (DD/MM/YYYY) on infopath form through XSD?

    Why would you want to do this?  YYYY-DD-MM is the official XML date format.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-11-2010 07:49 AM In reply to

    Re: How to set date format (DD/MM/YYYY) on infopath form through XSD?

    Client Requirement.
    ================================================
    ASP.NET, C#, Sharepoint 2007/2010/2013/SP Online, Infopath 2007/2010/2013 Admin/Developer
  • 10-11-2010 08:01 AM In reply to

    Re: How to set date format (DD/MM/YYYY) on infopath form through XSD?

    What is the client's requirement, specifically?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-11-2010 08:21 AM In reply to

    Re: How to set date format (DD/MM/YYYY) on infopath form through XSD?

    Client wants dates in DD/MM/YYYY format and I am not able to set this format on infopath form. So I was thinking may be I can set this restriction through XSD using regular expression, etc.

    ================================================
    ASP.NET, C#, Sharepoint 2007/2010/2013/SP Online, Infopath 2007/2010/2013 Admin/Developer
  • 10-11-2010 08:36 AM In reply to

    Re: How to set date format (DD/MM/YYYY) on infopath form through XSD?

    You can export the form's source and manually edit the XSD. Should work.  Here are guides on how to specify custom field formats in XSD using regular expressions:

    http://www.dpawson.co.uk/relaxng/schema/string.html

    http://www.15seconds.com/issue/031209.htm  (see the ssnumber section) 

     You may want to to point out to your client that it is a best practice to use the standard XML date format (yyyy-mm-dd) and that you won't be able to use any of InfoPath's built-in date functionality if you use something else.  InfoPath can display dates in any format even if the data underneath is yyyy-mm-dd.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 10-11-2010 07:58 PM In reply to

    Re: How to set date format (DD/MM/YYYY) on infopath form through XSD?

    Thanks a lot Jimmy.

    One more thing I need to know is how to make date field optional in infopath

    Thanks,

    Rahul Babar. 

     

    ================================================
    ASP.NET, C#, Sharepoint 2007/2010/2013/SP Online, Infopath 2007/2010/2013 Admin/Developer
  • 10-12-2010 12:28 AM In reply to

    Re: How to set date format (DD/MM/YYYY) on infopath form through XSD?

    Adding nillable=true attribute in xsd of the form solved the optional date field issue.

    Thanks,

    Rahul Babar 

     

    ================================================
    ASP.NET, C#, Sharepoint 2007/2010/2013/SP Online, Infopath 2007/2010/2013 Admin/Developer
Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.