Naming files by date for sorting

Naming files by date

Are you trying to organize and sort documents with dates in the title? For example, say you want to always have a list of newsletter files or meeting notes sort in chronological order. You may have started out naming files like this:

Newsletter-June-2018.pdf
Newsletter-July-2018.pdf
Newsletter-August-2018.pdf

But when you try to sort the file names, they are out of order like this, which is alphabetical and never chronological:

Newsletter-August-2018.pdf
Newsletter-July-2018.pdf
Newsletter-June-2018.pdf

What’s a better way to do this so that they actually sort in chronological order? Always use YY-MM-DD or YYYY-MM-DD format when naming files for this purpose. This means your documents will sort by year, then month, then day. And you can leave off DD (the day) if you don’t need to be that granular. Here’s our earlier example:

Newsletter-2018-06.pdf
Newsletter-2018-07.pdf
Newsletter-2018-08.pdf

And remember that if you want to sort documents by date that have different names, you can put the date first rather than second. Here’s another example, which shows how this will sort different types of files chronologically:

2018-06-Interview-Notes.docx
2018-06-Newsletter.pdf
2018-06-Newsletter-Banner.jpg
2018-07-Interview-Notes.docx
2018-07-Newsletter.pdf
2018-07-Newsletter-Banner.jpg
2018-08-Lead-Article.docx
2018-08-Newsletter.pdf
2018-08-Newsletter-Banner.jpg

In this particular example, this means that any files used to create the newsletter are grouped together by date as well.

Naming files consistently and help your folders and archives stay organized for years to come!


Recent Posts / View All Posts

Happy Thanksgiving from the OXEN Technology Team

Happy Thanksgiving from OXEN Technology

| Holiday | No Comments
Happy Thanksgiving from the OXEN Technology Team!
OneDrive for Business | Cloud Storage | Cloud Computing

What is OneDrive for Business?

| Office 365, Tech Tip | No Comments
If your organization uses Office 365, then you have OneDrive. But you may not be using it. Office 365 plans for business – Office 365 Business, Office 365 Business Premium,...
Confessions of an IT Professional Series

Confessions of an IT Professional – Part 1

| Security | No Comments
This week's article is the first in a series by OXEN's own Terry Allen, one of our technical engineers based in Joplin, MO. This post originally appeared on Bloggin' IT...