TMG-L ArchivesArchiver > TMG > 2010-11 > 1290468068
From: "John Cardinal" <>
Subject: Re: [TMG] Sorting Tags with Same Date
Date: Mon, 22 Nov 2010 18:21:08 -0500
Polly Held wrote, in part:
> Say the date for which you have several tags that you want
> sorted is 1 Jan 1870. Put that date in the date field for
> each of the tags. In the sort field, put the following:
> 1 Jan 1870-2 Jan 1870 For the tag that you want sorted first
> 1 Jan 1870-3 Jan 1870 For the tag that you wanted sorted next
> 1 Jan 1870-4 Jan 1870 For the tag that you want sorted next, etc.
> Check out the thread for a much better explanation for this
> solution. I know it works as I've used this method. I just
> don't know how to explain HOW it works.
I do not know the best way to explain how it works, but I know why it works.
In TMG, regular dates are stored using digits for the year, month, and day,
in that order. For date rages, both dates are stored. I'll omit some of the
details, but you can think of it like this:
"1 Jan 1870-2 Jan 1870" is stored as "1870 01 01 1870 01 02".
I added spaces to make it easier to see the parts (year first, then month,
then day, and then those fields again for the second of the two dates).
So, the values for the three dates above are:
1870 01 01 1870 01 02
1870 01 01 1870 01 03
1870 01 01 1870 01 04
The values are exactly the same for the first 15 characters, but the last
character differs. When TMG (or Second Site) sorts the events, the last
character will determine the sequence.