Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date calculations are wrong!

Status
Not open for further replies.

Lewy

Technical User
Nov 16, 2001
170
GB
I have just transferred my data from Pdox3.5 to Paradox 7. I have designed a new data entry form, with one of the field's being a date field, using Today() method to insert today's date. Another field on the form is a clients date of birth. A report is generated on completeion of the data entry which is meant to show the clients age. However if someone is say born in 1960, I get the age printed as -59, ie it is reading today() as 21/11/01 as 1901, I think!

Any suggestions as a way around this problem would be very welcome.

Many thanks,

Paul Lewis
 
During entry or conversion, the birth dates probably got entered as 20.. dates instead of 19.. To test this, pick one record, and re-enter the birthdate using all 4 digits (i.e. 1960), then check that record and see if this corrects the problem. If so, just make sure to enter all dates as 4 digits.
 
You should also change the date format setting in the Borland Database Engine (IDAPI.CFG) to True for 4-digit year.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top