P7&9 - Date Problems, Unbound Field 
Author Message
 P7&9 - Date Problems, Unbound Field
I have a form with 2 unbound fields, and the user types a Start and End date
into them.  I then plug those into a query, or use them to setGenFilter on a
UIObject.  Problem is, if they type 1/1/00 or any two digit year, I get some
error, I believe about invalid date format or something - should have
written it down.  However, 1/1/2000 or 1/1/1900 works fine.  I have BDE
5.00.  Aren't these apps Y2K compliant?  Can anyone tell me how to fix this
apart from writing my own date parser?  Many thanks for all help!


Sun, 06 Oct 2002 03:00:00 GMT
 P7&9 - Date Problems, Unbound Field

The best way is to set your regional settings to use 4 digit years, i.e.
dd/mm/yyyy rather than dd/mm/yy. We had to write it into our installation,
to automatically change these values.

Paradox hates it when you use two digit years.

HTH

Simon Keefe


Quote:
> I have a form with 2 unbound fields, and the user types a Start and End
date
> into them.  I then plug those into a query, or use them to setGenFilter on
a
> UIObject.  Problem is, if they type 1/1/00 or any two digit year, I get
some
> error, I believe about invalid date format or something - should have
> written it down.  However, 1/1/2000 or 1/1/1900 works fine.  I have BDE
> 5.00.  Aren't these apps Y2K compliant?  Can anyone tell me how to fix
this
> apart from writing my own date parser?  Many thanks for all help!



Mon, 07 Oct 2002 03:00:00 GMT
 P7&9 - Date Problems, Unbound Field
I usually create a table in their private directory (I call my table FromTo)
and it has just two date fields.  Then use those rather than unbound fields.
This allows Paradox to resolve the dates normally.  The other suggestion
would be to add a picture definition to the unbound fields that requires
them to enter a 4 digit year.

HTH,
Carolyn


Quote:
> I have a form with 2 unbound fields, and the user types a Start and End
date
> into them.  I then plug those into a query, or use them to setGenFilter on
a
> UIObject.  Problem is, if they type 1/1/00 or any two digit year, I get
some
> error, I believe about invalid date format or something - should have
> written it down.  However, 1/1/2000 or 1/1/1900 works fine.  I have BDE
> 5.00.  Aren't these apps Y2K compliant?  Can anyone tell me how to fix
this
> apart from writing my own date parser?  Many thanks for all help!



Mon, 07 Oct 2002 03:00:00 GMT
 P7&9 - Date Problems, Unbound Field
Use format "DYL"

EXAMPLE:
var
d date
datestring string
endvar

D=YOURUNBOUNDDATEFIELD
datestring=format("DYL",D)
DATESTRING.VIEW()

This will take a "00" date entry from anywhere, a sidewalk, a phone booth or
unbound field and convert it to a date with a "2000" 4 character year so it can
be used in a query. I use windows short date format on my unbound fields and
this works fine.

And of course, You can splice the datestring with ">" for use as query criteria
such as datequeryvar= ">="+datestring

A little less code than a date parser.

I use P7. I'm am suprised that Pdox9 has not dealt with this issue.

-RP

Randy Prentice



Wed, 09 Oct 2002 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Masked Date & Time Field Problem

2. Date format & Field tool problems

3. Unbound Currency Field causing problems

4. Field Formar for DBGrid & Date fields

5. Upsizing: Problems inserting date into SQL 7 date field

6. P7 - 2 digit date display on reports

7. Question on P7 date query to SQL

8. Query datetime-field by date when field contains date + time

9. Replace part of Date field by another Date Field

10. P7 autoinc field ok?

11. P7 temp dirs & ME

12. P7 - Blods field corrupted, urgent help.....


 
Powered by phpBB® Forum Software