format the time in minutes and hours