Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date Conversion Problem in Excel to VF....
Message
From
30/05/2002 10:36:23
N. Lea
Nic Cross Enterprises
Valencia, California, United States
 
 
To
30/05/2002 09:32:53
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00662945
Message ID:
00662996
Views:
20
>>As I looked over my code and went step by step thru it to locate my problem, I managed to find a HUGE portion of it. I use the automation to format the cell range correctly in the Excel file. However, when I copy it to a VF table, the procedure overwrites the table structure and replaces it with a new one. Thus I used COPY STRUCTURE and then did an ALTER TABLE. However, then I got a sharing violation to it when I tried to bring over the data into the table. It seems like when Excel is bringing data into Foxpro, it does not convert dates that well. It turns the date field into a numeric. Thus a typical date will turn into something like 37111. I have tried every method to convert it, but it will not come over. Does anyone have any ideas on how to maintain the date field in Excel to remain a date field when bringing it to Foxpro.
>>
>>Or a method to convert the numeric value of a date into a date form.
>
>Take a look at XL8 import Message #655336. It shows how to convert serialized number into the date.

I looked at it, and correct me if I am wrong (which I probably am), but it looks to me that I would take any numeric number that Excel produced when it transformed the date into a numeric or character. Then I would take the number and add it to the date of (^1899-12-30} to get the actual date it use to be?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform