I have data_inicio
and data_fim
and want to know the difference of hours and minutes between them. The data_inicio
will already be saved in the MySQL database as datetime
, data_fim
will pick the date when the user clicks a button. What is the best way to do this? Convert data_inicio
to milliseconds, compare to data_inicio
and then format the result to display in hours and minutes?