Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel-date-column transfer to dbase file
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00245626
Message ID:
00245805
Views:
17
>Is the field in the table set to Date type? The value you are seeing are days since 19-Oct-1992 (which is a truly odd start date for Excel).
>
>>i want to import a Excel file ( appe from FILE type xl5 ), but i can't get a column with DATE records.
>>exp. the date on Excel is 01/01/99, but after the record transfer to dbase will store with 38789. What can i do ??

According to Excel help, 'Microsoft Excel stores dates as sequential numbers known as serial values'. By default, serial value 1 associates with January 1, 1900. Help doesn't mention that routine that calculates those serial values has a bug: it treats year 1900 as a leap year. You can check it by entering date 02/29/1900 and see that serial value for it is 60.

There is a formula to convert a serial value into a date in Foxpro:

< date > = {12/31/1899} - 1 + < serial value >
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform