Problem Note 47112: Dates read from SAS® software into Excel with SAS® Providers for OLE DB are incorrect
With SAS Providers for OLE DB, SAS data is accessible from other applications, such as Excel. However, when the SAS data includes a date field, the results in Excel are off by 60 years and 1 day.
Workaround
To circumvent this issue, create a new variable and correct for the difference by adding 60 years to the informatted date value, using 21916.
Here is an example:
data in.correctdates;
set in.dates;
newbd=newdate + 21916;
format newbd mmddyy10.; run;
In the new Excel sheet, the value for NEWBD is correct.
A fix for this issue is planned for a future software release.
Operating System and Release Information
SAS System | SAS Providers for OLE DB | Windows Vista for x64 | 9.2 TS2M2 | |
Windows Vista | 9.2 TS2M2 | |
Windows 7 Ultimate x64 | 9.2 TS2M2 | |
Windows 7 Ultimate 32 bit | 9.2 TS2M2 | |
Windows 7 Professional x64 | 9.2 TS2M2 | 9.4 TS1M0 |
Windows 7 Professional 32 bit | 9.2 TS2M2 | |
Windows 7 Home Premium x64 | 9.2 TS2M2 | |
Windows 7 Home Premium 32 bit | 9.2 TS2M2 | |
Windows 7 Enterprise x64 | 9.2 TS2M2 | 9.4 TS1M0 |
Windows 7 Enterprise 32 bit | 9.2 TS2M2 | |
Microsoft Windows XP Professional | 9.2 TS2M2 | |
Microsoft Windows Server 2008 for x64 | 9.2 TS2M2 | 9.4 TS1M0 |
Microsoft Windows Server 2008 | 9.2 TS2M2 | |
Microsoft Windows Server 2003 for x64 | 9.2 TS2M2 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M2 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M2 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M2 | |
Microsoft® Windows® for x64 | 9.2 TS2M2 | 9.4 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | medium |
Date Modified: | 2012-08-23 13:20:46 |
Date Created: | 2012-08-01 11:47:50 |