calculate TIME difference in user form / show and save in database

hello ladies and gents,
i have created a user-form, where User´s can enter times (timepicker)
IN addition I would like to create a new field, which calculates the difference betwenn 2 timpickers and shows it on TEXTfield/user-input-field.
so my thought is:
ENTER TIME in “timepicker1”
ENTER TIME in “timepicker2”
ACTIVATE THE (BY CLICK) the text-field next to it, and get the difference nummeric
(f.e.: 10:00 - 11:30 = 1,5)

So far I managed to connect the database with the inputfields(timepicker) AND save them by clicking the submit-button, which I WANT to do with the new field (the difference) aswell.

If someone could provide some help/code, please consider that I´m ABSOLUTE new to wix :wink:
Also consider that “timepicker2” can be smaller than “timepicker1” due to day-jump.
(f.e: 22:00 - 02:00 = 4,0)

NAME OF my setups:
dataset: “hours dataset” which connects to my “hours” list/database
timepicker1: input sign in time (Value connects with “day1in”)
timepicker2: input sign out time (Value connects with “day1out”)
total1: Textfield connected with dataset and value connects to “totday1”

thanks for reading so far :wink:

THOMAS

1 Like

EDIT:
I had the problem to connect the “time-pickers” into repeaters, because they were set to “time”- as field-type. SO I had to change the field-type to “text” IF THIS effects any help.
(this tip, to set it to text-field was written by one of the users HERE.

Still would need help with the timedifference-calculation. :wink:

Any solution on that one?