Special Date Edit
Kenneth Brody
kenbrody at spamcop.net
Wed Oct 7 07:28:05 PDT 2015
On 10/7/2015 9:01 AM, Richard D. Williams via Filepro-list wrote:
[...]
> Have to fields for the data, one is a regular date edit (10, mdyy/)and the
> other simply require nn/nn/nnnn. (n could be a number or n could be a ?)
> Put a dummy field on the screen with the nn/nn/nnnn edit
> When the cursor leaves this field you must first look for any ?, this would
> tell you NOT to fill in the real date field and put this data into the other
> real field.
Why look for "?"? Why not just store it into your mm/dd/yyyy field? If
it's a valid date, you'll get a valid date field. If not, you'll get a
blank date field.
> If there are no ? in the field, test it by using another dummy var while a
> real date edit and attempt some date math, i.e. ha(8,mdy/)=hb+"0", (hb is
> the dummy var on the screen)
Adding zero to a non-date field will not get you a date, even if that field
"looks like" a date. Adding zero to a non-date "10/07/2015" would result in
"10".
> If you get 01/01/83 or no date at all you know there is an issue.
When would you get "01/01/83"?
[...]
>> 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/????
[...]
--
Kenneth Brody
More information about the Filepro-list
mailing list