Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting Xslx to Xls
Message
 
To
27/10/2016 11:44:52
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01642393
Message ID:
01642410
Views:
39
>>>>>>
>>>>>>I don't know if you can do that with with Excel automation, but if you are importing latest.xls into VFP, that is, as a table, just recreate the column value as a date.
>>>>>>
>>>>>>
>>>>>>ALTER TABLE latest RENAME COLUMN h TO hn
>>>>>>ALTER TABLE latest ADD COLUMN h D
>>>>>>UPDATE latest SET h = hn + {^1899-12-30}
>>>>>>ALTER TABLE latest DROP COLUMN hn
>>>>>>
>>>>>
>>>>>
>>>>>My code is now ALTER TABLE latest RENAME COLUMN h TO hn
>>>>>ALTER TABLE latest ADD COLUMN h D
>>>>>UPDATE latest SET h = hn + {^1899-12-30}
>>>>>ALTER TABLE latest DROP COLUMN hn
>>>>>cancel
>>>>
>>>>
>>>>Sorry I sent the last post too early - it errors on the update line with operator / operand type mismatch
>>>
>>>Can you put here the result of DISPLAY STRUCTURE of the latest table?
>>
>>Hn is 13 character fields with 42667
>>
>>H is an empty date field
>>
>>Sorry I dont know how to put the whole structure but these are the only 2 fields we are dealing with
>>
>>Thanks for all your help so far
>>
>>Colin
>
>Change the UPDATE line to
>
>
>UPDATE latest SET h = VAL(hn) + {^1899-12-30}
>
>
>and keep the rest.

Works fine

Thanks for all your help

Please email something about yourself to me at colin@colin-northway.com. Are you on liinkedin - maybe you could connect to me

Thanks for all your help

Colin
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Previous
Reply
Map
View

Click here to load this message in the networking platform