If I run the following SQL in Management Studio
select datepart (yy,DateTime) 'Year'
,datepart(mm,DateTime) 'Month'
,datepart(dd,DateTime) 'Day'
,COUNT (DISTINCT Client_MAC) AS Total
from dbo.NPM_NV_WL_REPORT_CLIENTS_V
Where datepart(yy,DateTime) = '2013'
AND DATEPART(mm,DateTime) = '07'
Group By datepart(yy,DateTime)
,datepart (mm,DateTime)
,datepart(dd,DateTime)
Order by DATEPART(dd, DateTime) ASC
I get the following output
Year | Month | Day | Total |
2013 | 7 | 1 | 738 |
2013 | 7 | 2 | 807 |
2013 | 7 | 3 | 754 |
2013 | 7 | 4 | 140 |
If I create a custom sql report in report writer and paste the above code in then I get the results in the attached file (I tried to inline it but couldn't seem to make it work.)
I'm pretty sure I had no wireless clients connecting in 1905 even if I had requested from that year Any idea idea why it's giving me 1905 in the year column and January 1900 in the month column? The day and totals are still correct.
Thanks,
Laura