I'm having to modify a Stored Procedure. I'm trying to calculate the number of days worked down to the decimal. So far, I've got :
Select ((DateDiff(d,'04/01/2004','04/29/2004') / 30) * 21)
(only more elegant)...
now according to my math,
((28/30)*21) = (0.93333 * 21) = 19.59 but I keep getting zeros. I tried to CAST it to a specific type and I can get decimal values as long as they are over 1 but under 1 (0.9333) comes back as zero
Any thoughts?
Thanks
Select ((DateDiff(d,'04/01/2004','04/29/2004') / 30) * 21)
(only more elegant)...
now according to my math,
((28/30)*21) = (0.93333 * 21) = 19.59 but I keep getting zeros. I tried to CAST it to a specific type and I can get decimal values as long as they are over 1 but under 1 (0.9333) comes back as zero
Any thoughts?
Thanks