Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem populating a VFP table with an Excel 'date' fiel
Message
From
03/03/2000 01:09:19
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00340955
Message ID:
00341096
Views:
25
Thats the serialize data value. First off, you have to figure out which date system is being used, then convert:

WITH oExcel.ActiveBook
IF .Date1904
dDate={^1904-01-02}+VAL(.ActiveCell.FormulaR1C1)
ELSE
dDate={^1901-01-01}+VAL(.ActiveCell.FormulaR1C1)
ENDIF



>
>I'm trying to populate a date field in a table with a date from an Excel file. The date looks ok in the Excel file, but when I put it in a varaiable using the following code:
>
>.Range("C6").Select
>temp= ALLTRIM(.ActiveCell.FormulaR1C1)
>
>I get a 5 character number like 36841. Any ideas to help would be greatly appreciated.
>
>Thanks
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform