Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems appending datetime field from a delimited text
Message
From
20/06/2001 17:27:17
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00521684
Message ID:
00521695
Views:
17
Allan,
This is just a wild guess, but could it be that VFP changes some date settings before actually doing the append. I think calling the append from the menu is still using the native APPEND FROM command, but it may be wrapped with some environment settings such as SET DATE. It could be worth trying to change some settings before the append (e.g. SET DATE ANSI).
HTH

>>
>>Have you looked at what the text is for the date/time field? Unlike the a date field where the data is stored as a string in the format YYYYMMDD, a date/time value is probably stored in the same format a a FILETIME structure (2 DWORDS), since it, like the FILETIME structure are 8 bytes. If the text is in a readable date time format that can be converted using the CTOT() function, it's probably the easiest way and your best bet.
>
>Hi George,
>
>Here is part of one record as it appears in the text file (datetime field is the second-last one shown).
>
>"A","1240","1","1","00029","16:14:17","06/16",2001/06/16 16:14:17,25.49,
>
>Are you suggesting that when I bring these records in I should bring in each record seperately? I'm not opposed to doing that, and that may be what I end up having to do ---> however I find it kinda weird that when I append records to the table (with the datetime field as shown above) via the VFP menu selections (Table/Append Records) it brings in all the fields OK, but when I do it programatically, all fields are OK, with the exception of the datetime fields - which are empty. Thanks for your assistance.
Daniel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform