Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
shm
Yak Posting Veteran
86 Posts |
Posted - 2008-10-07 : 04:11:27
|
hi,in the dynamic report-- the query is written to get the hours who worked in the particular activity and subactivity for particular member and for a one week date for the particular project..in the query if it is 6.65 hours then it il convert to 7.5 hours..but in the report for a particular member when the total column is taken am not able to convert like this....means is there any property fro the column i had taken i shld change before i deploy |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-07 : 04:14:26
|
6.65 hours is not 7.5 but 7.05 hours. Always better to find time in seconds and then convert to minutes and hours. use datediff(ss,start,end) to get difference in seconds. then usesec/60 to convert to min and sec/3600 to convert to hours. |
|
|
shm
Yak Posting Veteran
86 Posts |
Posted - 2008-10-07 : 05:15:16
|
yes sorry i mentioned it as 7.5 it is coming as 7.05 only as u tld..wt is in the dynamic report for the total if it 17.65 am nt able to convert..for that wt change i shld make.. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-07 : 05:40:26
|
quote: Originally posted by shm yes sorry i mentioned it as 7.5 it is coming as 7.05 only as u tld..wt is in the dynamic report for the total if it 17.65 am nt able to convert..for that wt change i shld make..
can you post your current expression used? |
|
|
shm
Yak Posting Veteran
86 Posts |
Posted - 2008-10-07 : 06:10:56
|
select FLOOR(6.65)*60 + FLOOR((6.65%1)*100) minu --425select CONVERT(VARCHAR(10), FLOOR(425 / 60)) + '.' + RIGHT('0'+ convert(VARCHAR(10),425%60),2) --7.05am getting this but wt my problem is in dynamic report...there in one of the column as total it is not getting converted to the hours.. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-07 : 06:51:31
|
does value exists as 6.65 in db? or are you getting it from some date values? |
|
|
|
|
|