<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: time precision error in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72612#M975</link>
    <description>I just got SAS working on Excel. I used Excel 2010, and wrote 1 column called TIME with half-hour increments from 08:00 - 22:00. I then used the Import Wizard using PC Files Server, unchecked the Use DATE. format for Date/Time columns, and successfully imported the data. All times look correct.&lt;BR /&gt;
&lt;BR /&gt;
Code:&lt;BR /&gt;
&lt;BR /&gt;
ROC IMPORT OUT= WORK.TEST &lt;BR /&gt;
            DATAFILE= "x:\temp\test2.xlsx" &lt;BR /&gt;
            DBMS=EXCELCS REPLACE;&lt;BR /&gt;
     SERVER="ALAN-PC"; &lt;BR /&gt;
     PORT=8621; &lt;BR /&gt;
     SSPI=YES;&lt;BR /&gt;
     RANGE="Sheet1$"; &lt;BR /&gt;
     SCANTEXT=YES;&lt;BR /&gt;
     USEDATE=NO;&lt;BR /&gt;
     SCANTIME=YES;&lt;BR /&gt;
RUN;</description>
    <pubDate>Fri, 03 Jun 2011 16:49:25 GMT</pubDate>
    <dc:creator>AlanC</dc:creator>
    <dc:date>2011-06-03T16:49:25Z</dc:date>
    <item>
      <title>time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72605#M968</link>
      <description>I have the following data in Excel in a single column:&lt;BR /&gt;
&lt;BR /&gt;
Times&lt;BR /&gt;
8:00&lt;BR /&gt;
8:30&lt;BR /&gt;
9:00&lt;BR /&gt;
9:30&lt;BR /&gt;
10:00&lt;BR /&gt;
10:30&lt;BR /&gt;
&lt;BR /&gt;
I import the sheet into SAS as work.test using the ImportWizard, then try &lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
  set test; where Times=36000;&lt;BR /&gt;
&lt;BR /&gt;
and the data set "example" has no rows.  If I try &lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
  set test; where Times=28800;&lt;BR /&gt;
&lt;BR /&gt;
the data set "example" has 1 row.  If I try   &lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
  set test; where Times&amp;lt;= 36000;&lt;BR /&gt;
&lt;BR /&gt;
the data set "example" has &lt;BR /&gt;
&lt;BR /&gt;
Times&lt;BR /&gt;
8:00&lt;BR /&gt;
8:30&lt;BR /&gt;
9:00&lt;BR /&gt;
9:30&lt;BR /&gt;
&lt;BR /&gt;
but not 10:00.  If I try &lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
  set test; where Times&amp;lt;= 36000.0000000001;&lt;BR /&gt;
&lt;BR /&gt;
then 10:00 is included.  If I try &lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
  set test; where Times&amp;lt;= 36000.00000000001;&lt;BR /&gt;
&lt;BR /&gt;
then 10:00 is excluded.  Any ideas?</description>
      <pubDate>Fri, 03 Jun 2011 14:01:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72605#M968</guid>
      <dc:creator>JPB</dc:creator>
      <dc:date>2011-06-03T14:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72606#M969</link>
      <description>The rest of my post...  If I try   &lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
  set test; where Times&amp;lt;= 36000;&lt;BR /&gt;
&lt;BR /&gt;
the data set "example" has &lt;BR /&gt;
&lt;BR /&gt;
Times&lt;BR /&gt;
8:00&lt;BR /&gt;
8:30&lt;BR /&gt;
9:00&lt;BR /&gt;
9:30&lt;BR /&gt;
&lt;BR /&gt;
but not 10:00.  If I try &lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
  set test; where Times&amp;lt;= 36000.0000000001;&lt;BR /&gt;
&lt;BR /&gt;
then 10:00 is included.  If I try &lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
  set test; where Times&amp;lt;= 36000.00000000001;&lt;BR /&gt;
&lt;BR /&gt;
then 10:00 is excluded.  Any ideas?</description>
      <pubDate>Fri, 03 Jun 2011 14:03:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72606#M969</guid>
      <dc:creator>JPB</dc:creator>
      <dc:date>2011-06-03T14:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72607#M970</link>
      <description>Let's try again... If I try   &lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
  set test; where Times&amp;lt;= 36000;&lt;BR /&gt;
&lt;BR /&gt;
the data set "example" has &lt;BR /&gt;
&lt;BR /&gt;
Times&lt;BR /&gt;
8:00&lt;BR /&gt;
8:30&lt;BR /&gt;
9:00&lt;BR /&gt;
9:30&lt;BR /&gt;
&lt;BR /&gt;
but not 10:00.  If I try &lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
  set test; where Times&amp;lt;= 36000.0000000001;&lt;BR /&gt;
&lt;BR /&gt;
then 10:00 is included.  If I try &lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
  set test; where Times&amp;lt;= 36000.00000000001;&lt;BR /&gt;
&lt;BR /&gt;
then 10:00 is excluded.  Any ideas?</description>
      <pubDate>Fri, 03 Jun 2011 14:06:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72607#M970</guid>
      <dc:creator>JPB</dc:creator>
      <dc:date>2011-06-03T14:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72608#M971</link>
      <description>Recommend the OP read (and bookmark for future reference) this post about the SAS forums text-posting mark-up rules.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=27609" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=27609&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 03 Jun 2011 14:30:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72608#M971</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-06-03T14:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72609#M972</link>
      <description>I think I found the problem; it is a problem with Excel's precision:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://mobile.experts-exchange.com/Q_20074640.html" target="_blank"&gt;http://mobile.experts-exchange.com/Q_20074640.html&lt;/A&gt;</description>
      <pubDate>Fri, 03 Jun 2011 15:06:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72609#M972</guid>
      <dc:creator>JPB</dc:creator>
      <dc:date>2011-06-03T15:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72610#M973</link>
      <description>See this reference on how Excel handles dates and times:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://www.cpearson.com/excel/datetime.htm" target="_blank"&gt;http://www.cpearson.com/excel/datetime.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
The issue could also be how you are bringing in the Excel data which is not specified in your post. You also don't specify which version of Excel. The post you referred to was from 2001 and a lot of things have changed with Excel since then.&lt;BR /&gt;
&lt;BR /&gt;
Can you provide more clarification?&lt;BR /&gt;
&lt;BR /&gt;
I am having issues with my SAS/Excel engine so I have to get that corrected to do the testing but more info can help once I am to that point.</description>
      <pubDate>Fri, 03 Jun 2011 15:33:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72610#M973</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2011-06-03T15:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72611#M974</link>
      <description>Thanks for the reference.&lt;BR /&gt;
&lt;BR /&gt;
I am using the dialog that appears when you click "File-&amp;gt;Import Data..." with default settings, which is what I meant when I said I am using the ImportWizard.&lt;BR /&gt;
&lt;BR /&gt;
I am using Excel 2007.  I also tried Excel 2003.</description>
      <pubDate>Fri, 03 Jun 2011 15:48:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72611#M974</guid>
      <dc:creator>JPB</dc:creator>
      <dc:date>2011-06-03T15:48:59Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72612#M975</link>
      <description>I just got SAS working on Excel. I used Excel 2010, and wrote 1 column called TIME with half-hour increments from 08:00 - 22:00. I then used the Import Wizard using PC Files Server, unchecked the Use DATE. format for Date/Time columns, and successfully imported the data. All times look correct.&lt;BR /&gt;
&lt;BR /&gt;
Code:&lt;BR /&gt;
&lt;BR /&gt;
ROC IMPORT OUT= WORK.TEST &lt;BR /&gt;
            DATAFILE= "x:\temp\test2.xlsx" &lt;BR /&gt;
            DBMS=EXCELCS REPLACE;&lt;BR /&gt;
     SERVER="ALAN-PC"; &lt;BR /&gt;
     PORT=8621; &lt;BR /&gt;
     SSPI=YES;&lt;BR /&gt;
     RANGE="Sheet1$"; &lt;BR /&gt;
     SCANTEXT=YES;&lt;BR /&gt;
     USEDATE=NO;&lt;BR /&gt;
     SCANTIME=YES;&lt;BR /&gt;
RUN;</description>
      <pubDate>Fri, 03 Jun 2011 16:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72612#M975</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2011-06-03T16:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72613#M976</link>
      <description>My first approach with any data that originates in Excel is to turn of the format in the source sheet and look at the values. Excel does so much rounding and such that exact matches  such as your =36000 can be quite problematic on top of the precision issue.</description>
      <pubDate>Fri, 03 Jun 2011 17:29:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72613#M976</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-06-03T17:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72614#M977</link>
      <description>Friends don't let friends use excel !</description>
      <pubDate>Fri, 03 Jun 2011 17:35:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72614#M977</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2011-06-03T17:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72615#M978</link>
      <description>It *looks* correct on mine as well.  Now try something like&lt;BR /&gt;
&lt;BR /&gt;
data example;&lt;BR /&gt;
set test; where Times=36000;&lt;BR /&gt;
&lt;BR /&gt;
and see what happens.  You should get a data set with 1 row, but when I use Excel 2003/7 and SAS, I get 0 rows.</description>
      <pubDate>Fri, 03 Jun 2011 17:53:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72615#M978</guid>
      <dc:creator>JPB</dc:creator>
      <dc:date>2011-06-03T17:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72616#M979</link>
      <description>I still cannot replicate it. SAS appends a date to the time to make a datetime on the import. Hence, it appends date 0 in Excel.&lt;BR /&gt;
&lt;BR /&gt;
I would suggest just taking the int portion of the value and using it. Something could be happening with the translation from Excel to SAS, with SAS, with Excel, etc. &lt;BR /&gt;
&lt;BR /&gt;
You are ultimately doing an equality clause usingt the numeric value since you know how SAS handles its epochal time values. I would instead use a function to identify the actual time value and use that in the where clause, especially when dealing with 2 systems that do share epochal dates.</description>
      <pubDate>Fri, 03 Jun 2011 20:50:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72616#M979</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2011-06-03T20:50:53Z</dc:date>
    </item>
    <item>
      <title>Re: time precision error</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72617#M980</link>
      <description>*do NOT share epochal dates</description>
      <pubDate>Fri, 03 Jun 2011 20:51:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/time-precision-error/m-p/72617#M980</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2011-06-03T20:51:32Z</dc:date>
    </item>
  </channel>
</rss>

