Xform failed to submit with invalid time value

Hi everyone, I am using openmrs 2.2.1 and xform 4.3.14. I was using a form and it was working fine but I updated it by adding a new concept. The concept I added is a datetime variable and once I added it the form failed to submit with the error Invalid time value (hour must be two digits). I don’t know why I get this error because the time that I fill on the form has two digits. I have attach the image of the error and logs. Invalid time value - Pastebin.com

1 Like

Can you share a screenshot of the concept definition on the concept dictionary manager page?

Here is the screenshot of the concept definition

Open the form in the form designer and select Save As from the File menu. Then share the saved file contents via pastebin.com or as a file attachment.

Here is the file Xform sample form - Pastebin.com

What value do you have for the global property named xforms.dateTimeSubmitFormat?

And secondly, when you created this concept, before adding it on the form, did you start by giving it a Datatype of Time, and then later on change it to Datetime?

  1. The xforms.dateTimeSubmitFormat is yyyy-MM-dd’T’HH:mm:ssZ.

  2. When I created the concept I gave it “Datetime” datatype in the dictionary but when I open properties on form design it show “Date” instead of “Date and time” on Type. So I changed it to “Date and Time” but on the form design properties only.

Just for troubleshooting purposes, create a new Datetime concept, add it on the form, select Save As from the File menu and share the file contents via pastebin.com

The new concept is “Datetime”. Xform sample form1 - Pastebin.com

What is the name of the new concept?

The name of the new concept is “Datetime”.

I have decided to delete the form and create a new one using the same concept and apparently the form submitted successfully.