There are widgets like QTimeEdit, QDateEdit and QDateTimeEdit which you can use for all your time and date related inputs and then you can do all your calculations.