I am working on a dataset which contains the date and time of the cars issued for rent and then date and time of the returning cars. I am looking for a formula which can help me find the duration between these two dates and time. I am looking for total number of days and hours.
I have split the dates and time of the starting period and final period. Then I have calculated difference between dates and time. This way amount of days have been calculated separately and number of hours have been calculated separately. Then by combining both I can have the total time period. I am just wondering if there is any formula which can calculate the entire thing in one go rather split the dates and time.
Faheem Sultan – 92891LecturerB is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4
Try DATETIME_DIFF(column1, Column2) that would get you the results you needed in Integer format.
for example DATETIME_DIFF(check_in, check_out) results would be 6.
check_in : 2024/04/04
check_out : 2024/04/10
hadry youness is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
2