This is not very advanced.
1. Get the selected values from each dropdown box.
2. If the values are strings, you need to convert them to the data type DateTime, see
DateTime.TryParse[
^]
3. Then you subtract the two DateTime variables.
The result will be an object of type
TimeSpan[
^].
4. Store the value in a suitable table in your database
See
SQL Insert[
^]
5. You will also need a
database connection[
^] and a
SQL command[
^]
That should do it, I think.