Can you supply the code from your attempt?
Seems to work fine with this code.
declare @d1 smalldatetime = '1/1/2013', @d2 smalldatetime = '8/31/2013'
select datediff(dd,@d1,@d2)
______________________________________________________________________________________________
Forum posting etiquette.[/url] Get your answers faster.