UPDATE: Since I’ve had a couple questions about how to display the date as just the month and year, I created a Google Sheet demonstrating several fixes. You can view it here.
Whoever engineered the Date format for Google Analytics’ latest version has probably never actually tried to chart it out inExcel . Today’s date would show up as 20121118. And, of course, since that’s not a valid date format, Excel interprets it as text.
Formula To Use
To convert this to a date format Excel recognizes I wrote a function that uses the DATE, LEFT, MID, and RIGHT functions. You can see how it looks here:
Or you can copy and paste this and replace H7 with the cell address that contains the first date in your column:
=DATE(LEFT(H7,4),MID(H7,5,2),RIGHT(H7,2))
Breaking It Down
Date: The DATE function follows this format: DATE(year,month,day).
Year: This says, “Go into H7 and grab the four left-most characters.”
Month: This says, “Go into H7 and grab the middle two characters. Oh, and it starts at the fifth character. No need to thank me. Just trying to be helpful.”
Day: This says, “Go into H7 and grab the two right-most characters.”
To copy the formula down the column just double-click on the bottom-right corner of the cell containing the formula (in my case K7) or grab the fill handle (same bottom-right corner) and drag it down the column.
Wait Just A Second … Where’s The Year?
Very observant! Yes, there’s no year in any of the dates in Column K. You can decide exactly how you want your dates to show in cell formatting options. Learn more in this post on custom date formatting in Excel.
Google Analytics Has A Date Dimension???
Yep. To use access it, you need to use a custom report or the GA API. It’s not built in to the standard reports. You can see where to find it when building a custom report in this screenshot:
Learn More
You can learn more about data formatting in my Annielytics Dashboard Course, a video course that will teach you how to put your data in stilettos and work the pole. 🙂
~~~
If you would like to learn more about Excel, check out my Excel dashboard course. 24 instructional videos, totaling 6+ hours of instruction for $95.
disqus_7PmucBWuki says
Very helpful. Thank you so much. Need more practice on this. 🙂
Annie Cushing says
My pleasure!
AMc2010 says
I’d been tearing my hair out with this issue and a custom report – thanks for sharing!
Annie Cushing says
Happy to help! 🙂
Andrew Teoh says
Thanks for the help!
Annie Cushing says
You’re welcome!
Philip Tomlinson says
I found this article when trying to do the opposite.
For those trying to convert regular dates into GA’s format for importing Cost Data manually, this is the formula to transform a regular date into the right format for uploads:
=TEXT(A2,”yyyymmdd”)
A2 is the actual date
Annie Cushing says
Great point, Philip. Thanks!
Philip Tomlinson says
It’s just annoying when some report exports use “Month-Date-Year” as it doesn’t seem to be picked up as a date.
Annie Cushing says
If a date uses hyphens or forward slashes, Excel will recognize it as a date.
Brian says
100% helpful! My old formula was not as efficient.
Thanks!
Annie Cushing says
Happy to help! 🙂
Jeroen says
Hi Annie,
great article and (unfortunately) still valid today.
Here’s my challenge:
I cannot use the Date dimensions because of the API limitations.
In my case Month of Year returns 201501 (yyyymm) – I don’t have and don’t need to have the day.
Is there a formula I can use so I end up with 01/2015 ?
Thanks!
Annie Cushing says
Hi Jeroen!
Absolutely! I’m a little crushed for time to set this up right now, but if you send me a spreadsheet with some dates (or a link to a Google Spreadsheet) I’ll be happy to set it up for you and leave a note of how I did it! annie(at)annielytics(dot)com
Andrea says
Having the same issue here. Any help?
Tks
Annie Cushing says
I demonstrate the fix in this Google Sheet: http://bit.ly/ga-you-wildin. Let me know if you need any further help!