convert text data type field to time data type in Info Path 213 - InfoPath Dev
in

InfoPath Dev

convert text data type field to time data type in Info Path 213

Last post 03-08-2018 08:34 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-07-2018 08:49 PM

    convert text data type field to time data type in Info Path 213

    Dears, I have three fields in info path form library 1. Field 1 = Hour (data type is text). this is a drop down list where user can choose the value. For example the values will be like 7:00, 7:30, 8:00, 8:30, etc. 2. Field 2 = Meridian (data type is text). this will be radio button with two values AM, PM 3. Field 3 = Selected_Hour (data type is Time). the value of this field is based on above two fields. For example i choose 7:30 from first field drop down list and PM from second field radio button then the result in the third field must be 7:30 PM. Here i used concat function but the ends with an error. Error is 'Only date or time allowed'. Any help on this ?
  • 03-08-2018 08:34 AM In reply to

    Re: convert text data type field to time data type in Info Path 213

    Time is stored in XML as 24 hour time, with minutes and seconds. So, if you wanted to set a time field to 3 pm (for example) you'd set it to 15:00:00. This means you'll need to do more than just set the field to the concatenated value of your two fields. Personally, I would change the first dropdown to have the time plus am / pm, and have that for the display, with the value in the time format expected by IP. See attached sample - save the file locally, right click and select design, then you can preview it. I only added a few sample times to the dropdown, but it should give you the general idea.
    Hilary Stoupa

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