Date/Time Problem in Browser Forms - InfoPath Dev
in

InfoPath Dev

Date/Time Problem in Browser Forms

Last post 12-12-2007 08:49 AM by davidair. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-12-2007 08:16 AM

    Date/Time Problem in Browser Forms

    Hi all,

     I have an Infopath Browser form submitting to a webservice and to sharepoint.

    I have a few Date Fields, the data type is set to 'String' but the field is a Date Picker.

    When submitting from an infopath client the date appears in the database and sharepoint correctly: e.g '12/12/2007'

    Because i do not want to display the time, however when submitting from a web browser form it puts '2007-12-12T00:00:00' into both the database and sharepoint.

    Is there anyway i can remove the time bit on submit with some code or concat string?

    Thanks,

    Alex

     

  • 12-12-2007 08:49 AM In reply to

    Re: Date/Time Problem in Browser Forms

    Are you ever expecting storing anything but dates in your field? If not, consider changing the data type to "Date (date)" instread of "Text (string)" - then it will just work correctly like you expect.

    If not, you can add a rule to your field:

    Condition: field contains "T"
    Action: Set field's value to:substring-before(., "T")

    However this is hacky so I would advise just changing the data type instead.

    Note: for testing purposes, it's often useful to also drag the same field into the view as a plain textbox. Then you can see and debug the value right away without the need to save.

    David Airapetyan / Software Services Architect
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.