Hi Asha,
This forum post would be a good starting point for you.
Essentially you will need to store two dateTimes, a checkIn time and a checkOut time. Then you will trigger a microflow that calculates the time between the dateTimes using the minutesBetween function. You will then need to format that minutes between value so that it reads in hours and minutes.
This forum post has a good method for displaying the time duration. This newer post also has some ideas on how to format the time duration.
Hope this helps get you pointed the right direction!
Danny