We have an int field, call length in seconds. I'm sure its possible, but I cant think how to get it into hours/mins/secs or just mins/secs
I'm trying to do some calculations on it, an example
select convert(decimal(8,2),sum(convert(decimal,(length)))/60)/count(rowid) as 'avg call length (mins)' from callhistory
which gives me length in minutes, though obviously its in decimal. Has anyone got a pointer. (PS I know it'd be easy in VB or Crystal or something though this is going to be output straight to a static html web page so I need to try and do a SQL solution)
Cheers
Matt
Brighton, UK
I'm trying to do some calculations on it, an example
select convert(decimal(8,2),sum(convert(decimal,(length)))/60)/count(rowid) as 'avg call length (mins)' from callhistory
which gives me length in minutes, though obviously its in decimal. Has anyone got a pointer. (PS I know it'd be easy in VB or Crystal or something though this is going to be output straight to a static html web page so I need to try and do a SQL solution)
Cheers
Matt
Brighton, UK