didnt understand why you're storing date values like this in two different fields and also in this format. if you had used datetime fields manipulations would have been much easier.for current format its rather messy. here's a start for you to use in your queryDECLARE @SDate varchar(10),@STime varchar(10),@Edate varchar(10),@ETime varchar(10)SELECT @SDate ='20-01-2012',@STime ='07.00',@Edate ='22-01-2012',@ETime ='15.31'SELECT CONVERT(varchar(5),DATEDIFF(ss,CONVERT(datetime,@SDate+ ' ' + REPLACE(@STime,'.',':'),103),CONVERT(datetime,@Edate + ' ' + REPLACE(@ETime,'.',':'),103))/3600) + '.' +CONVERT(varchar(10),(DATEDIFF(ss,CONVERT(datetime,@SDate+ ' ' + REPLACE(@STime,'.',':'),103),CONVERT(datetime,@Edate + ' ' + REPLACE(@ETime,'.',':'),103))% 3600.0)/60.0)
------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/