Friday, May 20, 2011

SOP Friday: Date Formats

Standard Operating Procedures
SOP Friday: Date Formats

I had a very rare frustrating experience with dates the other day. On a written form, someone had written the date 11/10. That's it. 11/10. It was either November 10th or October 11th. But what year? Not even a two digit year? Although in this case, 11/10/11 or 10/11/10 might have just added confusion to things.

SOP Friday: Date Formats

- Overview -

There are generally two times when you write out dates. One is when communicating with people, like this:

June 1, 2011 (abbreviated 6/1/11)

or 1 June, 2001 (abbreviated 1/6/11)

The other occasion when you write out dates is when you are taking notes, creating file names, saving configuration files, and working with computers. In these situations, you need a format that is completely consistent so everyone on the team understands the format, knows what to look for, and can find things quickly.

Because you might have directories with a large number of files, a date format that is self-sorting. Here's our policy:

  • All time and Date stamps used in file names, saving configuration files, etc. will be in the form:
    YYYYMMDD e.g. 20111213
  • If just the month is used it would be 200612
  • If you have multiple files on a day (for example, iterations of a configuration file), you might add two digits, such as:
    2011121301
    2011121302
  • Do not abbreviate the year as in 111213 or 11.12.13


- Implementation Notes -

For old-timers in the crowd, you probably used this same system with DNS files back in the days when we hand-crafted them. With DNS files, you could use any numbering scheme you wanted. The system would simply implement the highest-numbered file sequence. So you could get away with

123
124
125
1012
etc.

This ran into problems when some program changed the file and implemented their own numbering scheme.

If you use the scheme outlined above, then the newest file will always have the highest number:

2011060101
2011060102
2011063001
2011082001
etc.

Note that you can make up to 99 changes per day to this file before you have an issue with the numbering scheme.

This is also handy for file version numbers, such as

FirewallConfig20110630

or
FirewallConfig2011063001
FirewallConfig2011063002


- Benefits -

This seems (and is) rather anal retentive. But it is very useful in avoiding confusion. I have been absolutely amazed at how many ways people have managed to write dates in their tech notes and with file names. When you have lots of files, and many versions, having a standard format can make it a lot easier and faster to find things.

Here are the date formats we don't use:
    6/1/2011
    6-1-2011
    6-1
    6-1-11
    1-June
    1-Jun-11
    6/1
    6/1/11
    1-Jun-2011
    Jun01
    June-1
    June-1-11
    June2011
I'm sure I forgot some!


- Forms -

There are no specific forms for implementing this SOP. You might write up a brief description of the procedure and put it into your SOP or binder.

This kind of policy requires that everyone on the team

1) Be aware of the policy

2) Practice the policy

3) Correct one another's errors

4) Support one another with reminders


Your Comments Welcome.

:-)




Now Available:
Introduction to Zero Downtime Migrations
Seminar on MP3 Download



No comments:

Post a Comment

Feedback Welcome

Please note, however, that spam will be deleted, as will abusive posts.

Disagreements welcome!