FormatDate sometimes returns dd/MM instead of MM/dd - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

FormatDate sometimes returns dd/MM instead of MM/dd

Last post 11-30-2017 02:28 PM by Hilary Stoupa. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 10-16-2017 04:09 PM

    FormatDate sometimes returns dd/MM instead of MM/dd

     Hello,

    We have a form that has input done by people in Mexico and in the US.  Because of this I had to change the formatting on the date picker field in the field's properties to 3/14/2001   without the * because if you use the * it will pull up whatever date settings are on that user's computer.  We want the date to always show as MM/dd/yyyy. 

    On the date picker field, I have a rule set that when it changes, it sets a different field called "custDateFormatted" and I have the code set to perform this action: concat("FormatDate /date=", ., " /format=MM/dd/yyyy") 

    This works fine 90% of the time.  However, sometimes when the user enters a date, such as 8/2/2017 in the date picker field, it shows up as 8/2/2017 in that date field, but the qRules code above translates it as 02/08/2017 in the custDateFormatted field.
    This happens even when the person is using an US computer. That same person can enter the date on many other forms in the same system and it gets entered correctly, but sometimes it shows up wrong.
    In addition, this is happening to many different people, sporadically.
    The problem is that the dates being entered are customer due dates.  So if the due date is actually August 2nd but it wrongfully shows up as Feb 8th, then obviously we will miss our customer due date, so this is a huge issue.

    Do you have any idea why this would be happening so sporadically?  Is there any other ways I an force the date to always  translate as MM/dd/yyyy?

    Thank you in advance.  

  • 10-19-2017 07:48 AM In reply to

    Re: FormatDate sometimes returns dd/MM instead of MM/dd

     So - the field the user enters data into - what is the data type? Is it a date field?

    Hilary Stoupa

  • 10-23-2017 09:43 AM In reply to

    Re: FormatDate sometimes returns dd/MM instead of MM/dd

     Hello Hilary,

    Yes, it is the date picker field  that is described in the first paragraph.

  • 10-23-2017 10:01 AM In reply to

    Re: FormatDate sometimes returns dd/MM instead of MM/dd

    I understand that you are using a date picker control - I'm wondering about the data type of the field. Is it a date? DateTime? String?
    Hilary Stoupa

  • 10-23-2017 11:25 AM In reply to

    Re: FormatDate sometimes returns dd/MM instead of MM/dd

     It is a date, with the date formatting set as 3/14/2001

  • 10-23-2017 12:36 PM In reply to

    Re: FormatDate sometimes returns dd/MM instead of MM/dd

    I'd like to see the form template as well as sample XML that show forms that have had the issue. Can you send those to Support AT Qdabra DOT com & reference this thread?
    Hilary Stoupa

  • 10-23-2017 12:40 PM In reply to

    Re: FormatDate sometimes returns dd/MM instead of MM/dd

     Yes. I'll send it to you shortly.

    Thank you. 

  • 10-30-2017 07:51 AM In reply to

    Re: FormatDate sometimes returns dd/MM instead of MM/dd

    Hi - I haven't seen an email about this yet - did you send it?
    Hilary Stoupa

  • 11-30-2017 02:28 PM In reply to

    Re: FormatDate sometimes returns dd/MM instead of MM/dd

    Thanks for sending your form - I can't get the issue to reproduce, which isn't surprising since you've mentioned it doesn't always happen. However - I am perplexed by the design of the form. Can you help me understand why you need this additional field instead of promoting the dueDateFromCustomer field to the library? XML stores the date value as yyyy-MM-DD. I also don't understand why there is a field that is not inside the repeating group in the schema being used inside the repeating table for this....
    Hilary Stoupa

Page 1 of 1 (9 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.