Format Drop-Down List Box Content on InfoPath Form

I am using SharePoint 2013 and InfoPath to create a registration form that will allow students to register for classes. I have created a calendar in SharePoint. The classes have been added to the calendar. I am using the "Start Time" field from the calendar to populate the "Class Date" field (a Drop-Down List Box) on the InfoPath form.

When users go in to SharePoint to complete the form, the Class Date field is displayed in ISO time format (e.g., 2015-09-18T 10:30:00). When I view the form, however, the class date is formatted and then displayed (e.g., 9/18/2015 10:30 AM).  How can I format the display for site visitors who go into SharePoint to complete the form?

Thank you.

September 11th, 2015 7:30pm

Hi,

The scenario you met is by design in SharePoint. Dont worry, here is a workaround to achieve your requirement.

You want to display date like 9/18/2015 10:30 AM when users fill in the InfoPath form. You can create a calculated column to display data of Start Time column in Calendar list. Then you can set the dropdown list value to retrieve data from the calculated column in InfoPath form. And the dropdown list will display date format you want when users fill the form, which is the same as you viewed in the form.

The formula of the calculated column in Calendar list is: IF(HOUR([Start Time])<12, TEXT([Start Time], "MM/DD/YYYY HH:MM")&" AM", TEXT([Start Time], "MM/DD/YYYY ")&INT((HOUR([Start Time]))-12)&TEXT([Start Time], ":MM")&" PM").

What the dropdown list displays when you fill in the form:

Thanks,

Dean Wang

Free Windows Admin Tool Kit Click here and download it now
September 14th, 2015 3:23am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics