Totalling hours and minutes | XM Community
Skip to main content

Hi all,
I've created a matrix table question where users input the time a store opens and closes (below)
I'd like to be able to show them in a question underneath "you indicated that you are open for X hours a week, how many of these are staffed?"
What is the best way of being able to total the open hours? I'm assuming js of somekind but not sure where to start
many thanks in advance!
image.png

You can use the code posted here.
This is a working demo for the same.


https://www.qualtrics.com/community/discussion/comment/33366#Comment_33366ahmedA Thanks for this, but the demo doesn't work, it seems to have mm/dd/yyyy validation in place which doesn't accept hh:mm


Sorry for that. I was checking if they had any validation available for the HH:MM type...and selected that.
You can see the demo now.


https://www.qualtrics.com/community/discussion/comment/33392#Comment_33392Thanks ahmedA I can see that working now! I'll save that code for future use!
Unfortunately I forgot to mention that this is within a loop and merge, and I can't seem to make it re-embed the data for each loop. I'm wondering if I'd be better trying to create some kind of horizontal constant sum instead


Leave a Reply