Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Importing dates
Message
From
27/06/2001 13:30:28
 
 
To
27/06/2001 13:20:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00524124
Message ID:
00524317
Views:
12
So your .dat file is basically a flat ASCII file (.TXT)
If that is so, then it cannot contain dates per se but their ASCII (character) representation. As you mentioned, in your case they ar of the form "MM/DD/YY" right?
Then if you have a sample like this:
Moe Howard!123 Stooges Ave.!12/31/01
Larry Fine!123 Stooges Ave.!01/27/01
then a dbf with structure:
Name C(20)
Addrs C(25)
HireDate C(8)
should be able to be APPENDed FROM.

Then you can either use ALTER TABLE or otherwise add a new Date column and convert the character date to a Date field (see the DATE(y,m,d) function)

Doesn't this work for you?



>Thanks for your reply. I am creating a .dat file that is supposed to
>exactly mimic the foxpro table i'm going into. I delete and pack the
>table and then append from the .dat sequential file into it. I have
>delimited the .dat file with exclamation points. I use a command like this.
>
>use p:\pro60\test50062\artran81.dbf
>
>append from P:\pro60\WADATA\NewData\81ARTRAN.MMDDYYHHMM.DAT TYPE delimited with character !
>
>My first date field ends up blank and then the next field, which is a character field, is overwritten by the next field. Something about the date field
>not getting translated correctly causes the append from command to skip to the
>next field.
>
>does this make any sense. I'm a newbie to Foxpro with 20+ years of cobol.
>This import is for our new SBT (ACCPAC) accounting package. We're loading the databases with our mainframe data.
>
>Thanks.
>
>Doug Bell


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform