Re: convert duration(mediumint) to hours and minutes

2007-03-29 Thread Michael Dykman
this will format that value inline. select concat(floor(pr_id / 60),':',mod(pr_id,60)) AS mytime from ... If you are running 5.0+ you may want to push this down into a UDF - michael On 3/29/07, Reinhart Viane <[EMAIL PROTECTED]> wrote: Hello list, I have a table events in a database that has

convert duration(mediumint) to hours and minutes

2007-03-29 Thread Reinhart Viane
Hello list, I have a table events in a database that has a field named duration. This field is a mediumint containing an amount of minutes (eg 65, 87, 10368) Now I need these to be outputted into a h:mm (so 65 will be represented as 1:05) My complete query is: select YEAR(events.workdate) as they