Unique month

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Re: Unique month

Post by Sundog »

BobH wrote:Having been in IT ... - I adopted the ddMmmYYYY format for dates a long time ago. ...it facilitates sorting for ascending descending...
BobH, I prefer the YYYYMMDD format myself, as it sorts in true ascending or descending sequence. Doesn't your format end up with all "1st day of the month" dates sorted together for example, no matter what the month or year? Or am I missing something obvious? :scratch:

E.g., YYYYMMDD descending:
  • 20101018
  • 20090922
  • 19900101
vs. ddMmmYYYY ?
  • 01Jan1990
  • 18Oct2010
  • 22Sep2009
Sundog

User avatar
HansV
Administrator
Posts: 78536
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Unique month

Post by HansV »

That depends on how the dates are stored.

If they are text values, one should use YYYYMMDD.

Programs such as Excel and Access, however, store dates as numbers, and the format is merely a way to display them. Dates will be sorted correctly regardless of the display format.
Best wishes,
Hans

User avatar
Sundog
5StarLounger
Posts: 704
Joined: 28 Jan 2010, 22:47
Location: Alien Country (Roswell NM)

Re: Unique month

Post by Sundog »

I understand. I use YYYYMMDD as a part of file names as an easy version control method, since the "File Date" may change for a particular version as various reviewers weigh in.
Sundog

User avatar
HansV
Administrator
Posts: 78536
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Unique month

Post by HansV »

Yes, in that case YYYYMMDD is the format to use - file names are sorted as text, so DDMMMYYYY wouldn't be sorted correctly, but YYYYMMDD will.
Best wishes,
Hans

User avatar
BobH
UraniumLounger
Posts: 9295
Joined: 13 Feb 2010, 01:27
Location: Deep in the Heart of Texas

Re: Unique month

Post by BobH »

Yikes! Yes, I do put the year first. Senior moments (aka brain fahrts) are awful!
Bob's yer Uncle
(1/2)(1+√5)
Dell Intel Core i5 Laptop, 3570K,1.60 GHz, 8 GB RAM, Windows 11 64-bit, LibreOffice,and other bits and bobs