I have a data frame for bike trip for a city, I have two columns, one for the start date-time and other for the end date-time, the tripduration is a calculated column using the difftime function.
bikeRides$tripduration <- difftime(bikeRides$ended_at, bikeRides$started_at, units ="hours")
The problem is. whatever time unit I use, when the trip goes for one day to another, the time it calculates is more than a day as you can see in the second column, that being a aprox 20 minutes trip
perhaps to help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one: