Special Date Edit

Stanley - stanlyn.com stanley at stanlyn.com
Tue Oct 6 12:05:47 PDT 2015


>> How do you expect date math to work?

For sorting, have the missing portion take on a 00 or 0000 if a year.

In other words day and month "00" would be the day or month before "01", and year "0000" would be the year before "0001"

I fully understand that 00/15/2015 is an invalid date, however I'm looking for a way that allows entry into a date field and sort before a date of 01/15/2015 and 01/01/2015, whereas a date of 00/00/2015 would sort before 01/01/2015.

Another way of looking at it would be to sort it as a string in year/month/day order.  Then sorting of these invalid values would be correct.  

Any way to get an edit to do this instead of treating it as a string? 

It should be noted that I do not like the idea of having invalid dates in the database, but we have a lot of invoices that needs entered where we don't have valid complete date info, instead we have fragments and those fragments which we know to be true needs to be entered into the proper placeholder, ie. month, day or year part.  Then see those items in a report along with invoices having good dates and selected as part of a date range.  As a string, 2015/01/00 sorts after 2014/12/31 and before 2015/01/10.

So maybe that is the answer, create an edit in year/month/day order.  Do you see any issues with sorting, selecting a range, etc.? 

Thanks,
Stanley




-----Original Message-----
From: Kenneth Brody [mailto:kenbrody at spamcop.net] 
Sent: Tuesday, October 6, 2015 1:24 PM
To: Stanley - stanlyn.com <stanley at stanlyn.com>; filepro-list at lists.celestial.com
Subject: Re: Special Date Edit

On 10/6/2015 1:11 PM, Stanley - stanlyn.com via Filepro-list wrote:
> Hi,
>
>
>
> I need a special edit that allows the entry of bad dates AND allows 
> for date math.  For example we have a lot of invoices that portions of 
> the date is unknown like having a missing day part or a missing month 
> part, or a missing year part.
>
>
>
> ??/02/2000
>
> 12/??/2000
>
> 12/15/????
>
> And any other combination,

How do you expect date math to work?

What's the day after "12/??/2000"?

How many days are there between "??/02/2000" and "12/??/2000"?

--
Kenneth Brody



More information about the Filepro-list mailing list