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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date format problem FP 2.00

Status
Not open for further replies.

rowin

Technical User
Apr 1, 2003
12
GB
The main database has a field Cal that is Character

It stores the record's date in the UK format:
dd/mm/yy

I need to add some 900 records to it from a Open office spreadsheet. When I save the spreadsheet as a dbf file it changes the cal to mm/dd/yy.

I have tried set date Brit. It makes no difference

I can not find a solution to forcing the saved dbf file to show the cal in character format and in the dd/mm/yy layout.

Does anyone know a solution?

Robin


 
It seems to me that the issue is with the way Open Office creates the file. Assuming that one can not adjust the way OpenOffice creates the file, then you will needed to 'adjust' the date information in the dbf before importing it.

One could adjust the data with a single replace statement/
e.g. replace ALL Date_info with (<Date info swaping code>)

Post again if you need more help.

Lion Crest Software Services
Anthony L. Testi
President
 
I just now did a Google search for "open office" date format and found a number of 'finds' which address how to change the format of the Dates created by Open Office.

Additionally another search for "openoffice" date format also returned a number of 'finds' which addressed the same.

Consider reviewing those sites to see if you can get OpenOffice to change the Default of its Date format.

Good Luck,
JRB-Bldr
 
The problem isn't with date formatting. You're trying to import into a character field. Date formatting (for display) is immaterial as long as you stay with a date data type.

I'd import that file into a temporary DBF with the date coming into a date field, and then process row-by-row converting the date into the character string you need.
 
Thanks for the replies. I have in effect followed your advice and have the date corrected in the database.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top