Tom,
I can think of three ways to prevent this
1) create a RULE that requires the date field to be  >= some floor date
2) define TRIGGERS to check date values similar to the rule and abort if it 
fails test
3) if date is entered in a form use a format mask

 Jim Bentley
American Celiac Society
[email protected]
tel: 1-504-737-3293



----- Original Message ----
From: Thomas Eldred <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Thursday, December 11, 2008 1:31:57 PM
Subject: [RBASE-L] - RE: 0008 instead of 2008

The problematic date (contribdate) is inserted by way of a form which is
entered by the user. We use the four digit year format here.  Issue arises
when the user enters 12/12/08, but not if 12/12/2008 is entered.

Startup.rmd includes the commands

SET DATE CENTURY 19
SET DATE YEAR 50

But in the same exact file as the problem date, two other dates are inserted
correctly. Their insert codes are:

INSERT INTO rushtrans (rushnum, pinnumber, processdate) VALUES (.vrushnum, +
.voldpin,  .#DATE)
and
UPDATE rushtrans SET pinnumber = .vnewpin +
WHERE rushnum =.vrushnum AND  processdate = .#DATE

Thank you

Tom

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ramsour Mike
Sent: Thursday, December 11, 2008 11:30 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: 0008 instead of 2008

Tom:

How does the data get into your tables?

I load a lot of my data from ASCII fixed field files with various date
columns.  Some of the values come in as 12/11/2008 while others come in as
12/11/08 for example.

If your date format is set to MMDDYYYY and a value comes in to a table as
MMDDYY then that value will show up as 12/11/0008.

The bottom line is if you are importing data from external files then make
sure your date format setting matches the format of the date values being
loaded.

Hope that helps.

Have a great day.

Mike Ramsour

-----Original Message-----
From: Thomas Eldred [mailto:[email protected]] 
Sent: Thursday, December 11, 2008 11:21 AM
To: [email protected]
Subject: [RBASE-L] - RE: 0008 instead of 2008

I must be missing something then . . . my startup file (start.rmd) has
similar language in it...but the entries register incorrectly still.

Tom


      


Reply via email to