change date format

I created a derived table that count the leads that we got  in each day:

34df64fc-322c-4d25-a80a-bdcab3aebe18.png

Instead of that, I want to count the number of the leads we got each MONTH. For that I need to cast the dates to a different format (MM-YYYY).

I tried to use the FORMAT function, but the query failed:

49dd620e-bc4f-466e-aa8c-10586e139f8c.png

Do you have any suggestions? other solutions?

0 2 507
2 REPLIES 2
Top Labels in this Space
Top Solution Authors