>If I recall correctly Fox has had trouble with importing dates from SDF files dating back to FoxBASE+. While I must admit I'm a little disappointed by this news, there's a simple work around.
First, remember I am in 2.6.
>
>Do the following, on the orginal table (with the actual date field), issue a call to AFIELDS(). Locate the field in question and change it from date to character. If the incoming dates are have the year in a 4 digit format with separators make the field 10 characters wide, otherwise if it's 2 digits 8. Create a cursor from the array and append the SDF file into it. Use the DBF() function to determine the actual name and location of the cursor. Then select the real table, and do an APPEND FROM (lcfile) where lcfile is the name of the cursor file. The dates in the table will be correct and the ROLLOVER clause (in the case of 2 digit years) will be respected.
Once again, I am in 2.6. I did basically what you said.. but manually. Created two dbfs.... one with the date fields as C(10). I append from the text file into the DBF with character fields. Then, I use the DBF with the date fields and append from the previously created DBF. The date fields all come out empty.
Unless I was doing something wrong, that is what happened.
BOb
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only