Osman Posted August 10, 2022 Share Posted August 10, 2022 Good Morning, It has been brought to my attention that when submitting a service request that has a Progressive Capture containing a Form Field Type of Date & Time control, the resultant Date/Time is an hour wrong, see below: I suspect that this is something as simple as the ..Z date above is UTC and we are currently in British Summer Time in the UK? Please could you help with how we would remedy this? Thanks Osman Link to comment Share on other sites More sharing options...
Steve Giller Posted August 10, 2022 Share Posted August 10, 2022 What field are you storing the date/time in? You may wish to review the page on Mapping Fields and ensure that you are using a Date/Time field for this. Link to comment Share on other sites More sharing options...
Osman Posted August 12, 2022 Author Share Posted August 12, 2022 Hi Steve, From what I can see it isn't being mapped to any Custom Field, the screenshot above is being held in the Details of a Service Request item. So it is a blob of text being added to the Details from Progress Capture form responses. Thanks Osman Link to comment Share on other sites More sharing options...
Steve Giller Posted August 12, 2022 Share Posted August 12, 2022 In that case the display is correct. All date/times are created and stored in UTC and if the date is stored in a Date/Time field the UI will (in most places) format this to the User's time zone as set in their preferences. In the above scenario you could use the Request Details Form Designer to add a Custom Field (one of the Date/Time fields) to the Details, and use the Field Mapping to store the Capture Answer in this field. Link to comment Share on other sites More sharing options...
Osman Posted July 3, 2023 Author Share Posted July 3, 2023 Morning, I have only now had the opportunity to circle back to this and try the suggestion of mapping a Custom Field to a Pro Cap answer. I have done exactly as suggested and have mapped a Date/Time picker form field to Custom 21 and tested. The result is the same, the time is still an hour out, but it seems to be in a different part of the form: To be clear, the correct time is the one in the Questions section. Thanks Osman Link to comment Share on other sites More sharing options...
Steve Giller Posted July 3, 2023 Share Posted July 3, 2023 All times are stored in the database as UTC - as you can see from the trailing "Z" in the "Date and Time" field this is correct, but formatted in UTC not local time, so it appears that the Summary was also populated without formatting for local time. Link to comment Share on other sites More sharing options...
Osman Posted July 3, 2023 Author Share Posted July 3, 2023 Thanks Steve, Apologies if I missed it, but how do I format it for local time. As I have tested using both the RAW and Display Value for the date/time? Thanks Osman Link to comment Share on other sites More sharing options...
Osman Posted July 4, 2023 Author Share Posted July 4, 2023 Just by way of an update, I have kind of figured out how to fix this, it seems if I place square brackets around the value, it works. The only negative side effect seems to be that the UTC value shows up in the summary with square brackets around it in search results. But I think we can live with that for now. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now