Open
Exports and Date Formatting Problems with Excel
Excel doesn’t like dates in analytics exports because they are in DD-MM-YYYY format (because, Europe 😎 ). This breaks Excel’s automatic date format recognition for US region customers (and others who use MM-DD-YYYY). Day numbers greater than 12 are displayed as text/general and aren’t properly sortable.
This is massively frustrating! For example, there's no way to distinguish between January 8th or August 1st (01-08-2018 vs 08-01-2018).
Fortunately, there is an ISO standard for this, https://en.wikipedia.org/wiki/ISO_8601. Unfortunately, Excel doesn’t really like it when using the letter T for concatenating the Date and Time.
From what I can find, the generally accepted universal format to use for CSV exports is noted in this stack overflow thread: https://stackoverflow.com/questions/804118/best-timestamp-format-for-csv-excel
YYYY-MM-DD hh🇲🇲ss 👈🏻 Edit: Please fix the emojification problem
Relevant XKCD: https://xkcd.com/1179/
Ideally, making this change won't have much impact on current users because leading with a four-digit year is what most date parsing tools expect to see anyway.
I’ve attached a CSV I used for testing. The date used is October 25, 2018. The “Europe2” example uses October 3, 2018.
Here’s what Excel displays for me (US Region Settings):
In the interim, I can swap text around using Numbers on my Mac and re-export the CSV. This is in US format.
=CONCATENATE(MID(P2,4,2),"-",LEFT(P2,2),RIGHT(P2,14))
This matches the recommended format above and doesn't add text to blank cells:
=IF(L2="","",CONCATENATE(MID(L2,7,4),"-",MID(L2,4,2),"-",LEFT(L2,2),RIGHT(L2,9)))
I'm going to have to write a script to do it for me.
This is massively frustrating! For example, there's no way to distinguish between January 8th or August 1st (01-08-2018 vs 08-01-2018).
Fortunately, there is an ISO standard for this, https://en.wikipedia.org/wiki/ISO_8601. Unfortunately, Excel doesn’t really like it when using the letter T for concatenating the Date and Time.
From what I can find, the generally accepted universal format to use for CSV exports is noted in this stack overflow thread: https://stackoverflow.com/questions/804118/best-timestamp-format-for-csv-excel
YYYY-MM-DD hh🇲🇲ss 👈🏻 Edit: Please fix the emojification problem
Relevant XKCD: https://xkcd.com/1179/
Ideally, making this change won't have much impact on current users because leading with a four-digit year is what most date parsing tools expect to see anyway.
I’ve attached a CSV I used for testing. The date used is October 25, 2018. The “Europe2” example uses October 3, 2018.
Here’s what Excel displays for me (US Region Settings):
In the interim, I can swap text around using Numbers on my Mac and re-export the CSV. This is in US format.
=CONCATENATE(MID(P2,4,2),"-",LEFT(P2,2),RIGHT(P2,14))
This matches the recommended format above and doesn't add text to blank cells:
=IF(L2="","",CONCATENATE(MID(L2,7,4),"-",MID(L2,4,2),"-",LEFT(L2,2),RIGHT(L2,9)))
I'm going to have to write a script to do it for me.
Reply
Sign up
If you ever had a profile with us, there's no need to create another one.
Don't worry if your email address has since changed, or you can't remember your login, just let us know at community@gainsight.com and we'll help you get started from where you left.
Else, please continue with the registration below.
Welcome to the Gainsight Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.