Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date problems when importing excel files.
Message
 
 
To
04/01/2000 11:21:03
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00312458
Message ID:
00312477
Views:
25
You are dealing with ambiguous dates in Excel. The dates should be in Excel as 2000-01-01, not 00-01-01.

Regardless, there is nothing preventing you from catching this in your import routine, unless of course, you are relying on Append From x Type XLS....

If you are, you will need to use Automation Techniques instead, so you can fix the values...

Changing how the dates are displaying in Excel may help as well. Just curious, what version of Excel are you using. In Excel 2000, if I enter 01/01/00, it automatically formats it as 01/01/2000.

If the values in Excel are entered as strings, as opposed to dates, then you are definitely going to have to rely on automation techniques to fix the data. In your Excel Template, I would then recommend that date types are used, and the 4 digit year to be displayed...


>Hello.
>
>I have a problem with date values when importing Excel files, where values above 1999/12/31 values are incorrectly imported.
>
>For example, with a source date of 00-01-01 in excel, I ended up with 1899-12-31 in the imported DBF file. For this example the following settings were in effect: CENTURY OFF (on yeilded similar results), DATE TO YMD and MARK TO "-". I have tried other ettings, with other invalid result. Also, I am using Visual Foxpro 6.0, with no Visual Studio Service Pack.
>
>Could VS Service Pack 3 solve this problem? If not, any help in finding a solution to this problem would be appreciated.
>
>Thank you... and happy new year :-).
>
>Yan Vaillancourt
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform