TMG-L Archives

Archiver > TMG > 2003-01 > 1041684802


From: Linda Gaylord-Kuhn <>
Subject: RE: [TMG] 5.0x Sort Dates (Reprise Proposal)
Date: Sat, 04 Jan 2003 06:53:26 -0600
In-Reply-To: <5.1.1.6.2.20030104153105.03129c60@mail.internode.on.net>


From: Robin Lamacraft [mailto:]
> Sent: Friday, January 03, 2003 11:24 PM
>
> How to do you compare 1800 00 00 1800-54-00-00 and 1800 12 31
1800-54-00-
> 00?

Hi, Robin.

Eric pointed out a problem that caused me to re-think and put the
2-digit sort code at the end of the date string, so let's do that first
- instead of YYYY-SC-MM-DD use

YYYY-MM-DD-SC

Thinking out loud here, what does that do to your above examples and my
sample preferences?

After 1800 1800-00-00-54
After 31 Dec 1800 1800-12-31-54

> I want 1800 00 00 1800-54-00-00 to be sorted after 1800 12 31
> 1800-54-00-00. I want 1800 00 00 1800-54-00-00 to be sorted after 1800
12
> 00 1800-54-00-00. I not sure that is what you meant, etc.

Let's see if the general concept still works:

After 31 Dec 1800 1800-12-31-52
After Dec 1800 1800-12-00-53
After 1800 1800-00-00-54

Is this what you want? Remember you would have total control over the
second digit in the two-digit sort code.

> That is why I would have made your "after" strings
>
> 4 1 [none] YYYY MM DD = YYYY-MM-DD-41
> 4 2 on or after 1800 01 01 = 1800-01-01-42
> 4 3 on or after 1800 01 00 = 1800-01-99-43
> 4 4 on or after 1800 00 00 = 1800-99-99-44
>
> 5 1 [none] YYYY MM DD = YYYYMM-DD-51
> 5 2 after 1800 01 01 = 1800-01-01-52
> 5 3 after 1800 01 00 = 1800-01-99-53
> 5 4 after 1800 00 00 = 1800-99-99-54

Agreed. I think I stared at it so long I got a brain blip. <LOL>

> I think that the numeric sort of these will give the result that I
want
> for
> the cases that have been considered so far. Your "before" date strings
> would need reordering.
>
> What does comparing 2 equal imprecise values mean e.g. 2 "on or after"
> dates? There are a lot of questions to answer before you can get a
method
> that works according to common parlance.

I don't think I'm following you here on "2 equal imprecise values".
Give me some examples.

Linda



This thread: