Home Forums SQL Server 2008 T-SQL (SS2K8) days into completed weeks only RE: days into completed weeks only
Ron McCullough
SSC Guru
Points: 63877
More actions
September 10, 2012 at 7:14 am
#1535665
Is this what you need to do ?
SELECT 2.86 /1 - 2.86 % 1
SELECT 2.16 /1 - 2.16 % 1
Result for both selects is 2.000000
Note that the "%" is the modulo operator - check it out in BOL it is a powerful tool to become familiar with.
If everything seems to be going well, you have obviously overlooked something.
RonPlease help us, help you -before posting a question please read[/url]Before posting a performance problem please read[/url]