When you write out a full date, you separate the elements with a comma like so:
On June 26, 2015, I wrote this blog post.
Tomorrow is Saturday, 27 June, 2015.
(US style is usually written in month-day-year format; UK style is often day-month-year, but the comma rules are the same.)
When you cite just the month and year, you don't need a comma.
President Obama was born in August 1961.
In January 2009, he took the presidential oath of office.
People get this wrong all the time. I see a lot of errors like this:
*I visited her in September, 2012.