06-22-2015 05:26 PM
I formatted the column, PlayerDayDate (its original structure is datetime variable like this ,26NOV2014:00:00:00.000) to DTMONYY5 so I can do a summary function Count_Distinct based on GuestNumbers for each month in a year. The left table is my set-up and right table are the result. However, the second table had the Count-Distinct per day of the month, not for one whole month. How do I fix that so it can aggregated the Count_Distinct in Query per month instead per day.
06-22-2015 05:54 PM
If you're using SQL then the easiest method is to create a new field that is the month by using put(playdate, monyy7.) and then use that field in your group by clause.
PROC SQL does not recognize formats when aggregating data
Need further help from the community? Please ask a new question.