You can group by these columns by adding their lookup names to the list of custom columns that are to be added to the group menu. The lookup names are pubdate (publication date) and date (calibre's "Date" column, usually the date you added the book to calibre). See How do I add my custom columns to the Group menu?
for instructions on how to do this.
Once you have added the lookup names you wish to use, you will see them in the Group menu. Lets assume that you entered both date and pubdate. Tapping on date will give you groups based on year and month: yyyy-mm. Tapping on a year-month will give you all the books with that date. Tapping on pubdate gives you groups based only on year.