Pivot column data

Pivot column data

How can I make pivot data as in excel by year, by month, by quarter? And how to select only the years , months , and quarters?
 
Thanks