Jump to content
Sign in to follow this  
Paul Luther

Entering Dates

Recommended Posts

Richard Damon proposed this on the TMG-L ListServ in April 2008, and it works very well.

    [*]Put the actual date in the Date field but with a trailing 'BC' so that TMG will recognize it as an irregular date.

[For the sake of output, I recommend putting a non-breaking space (Alt + 255 on the numeric keypad) between the year and the 'BC' characters. While a non-breaking space makes any date irregular, since the date is intended to be irregular anyway this will also ensure the 'BC' characters stay on the same line with the digits of the year in the output.]

    [*]Enter the "9's complement" of the year in the Sort date field, but again use a trailing 'BC' so that TMG will also recognize it as an irregular date.

A "9's complement" is created by subtracting the actual 'BC' year number from a base number which is all 9's and has an equal or greater number of digits. For all 'BC' dates in your dataset you should use the same base which has the same number of 9's digits for all these subtractions. The number of 9's digits needed is dependent upon the number of digits in the oldest 'BC' year. For example, if your oldest/biggest 'BC' date in your dataset is "3000 BC", then a four digit (or bigger) 9's complement base will work, i.e. subtract all your 'BC' years from the base of '9999'. If you are unsure of the biggest/oldest BC year expected, always using the same 9's complement base which is too many digits will not hurt.

 

Since TMG sorts all irregular dates in alphanumeric order prior to all regular dates, this trick will sort all these irregular 'BC' Sort Dates in the proper order before regular (CE) dates. Reports will print what is in the Date field but events will be sorted in correct (reverse numeric) order because of their "9's complement" irregular Sort Dates. For example:

Irregular     IrregularDate          Sort Date100 BC        9899 BC20 BC         9979 BC8 BC          9991 BC1 BC          9998 BC
Hope this gives you ideas,

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×