<?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: Importing date-time variables from Excel into SAS in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129885#M1328</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked! Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Mar 2013 16:22:36 GMT</pubDate>
    <dc:creator>Mercator</dc:creator>
    <dc:date>2013-03-07T16:22:36Z</dc:date>
    <item>
      <title>Importing date-time variables from Excel into SAS</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129881#M1324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do a lot of studies involving hospitalized patients. Thus I have a number of date-time variables, e.g. admission date-time. When I import an Excel spreadsheet into SAS the time part of the date-time variables gets stripped off. Is there a way to import data from Excel in which the date-time variables stay intact?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;Andrew&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 14:52:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129881#M1324</guid>
      <dc:creator>Mercator</dc:creator>
      <dc:date>2013-03-07T14:52:36Z</dc:date>
    </item>
    <item>
      <title>Re: Importing date-time variables from Excel into SAS</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129882#M1325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you provided examples of some of the datetime formats you see in Excel, I'm sure you'll receive an answer, but it's difficult to assit without being able to reproduce your problem.&amp;nbsp; It would also be important to know how your are importing your data.&amp;nbsp; What version of SAS are you using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 15:22:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129882#M1325</guid>
      <dc:creator>mlamias</dc:creator>
      <dc:date>2013-03-07T15:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Importing date-time variables from Excel into SAS</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129883#M1326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry. Here's an example of the date-time formats in Excel:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="254"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="127"&gt;HADMDTTM&lt;/TD&gt;&lt;TD class="xl65" width="127"&gt;IADMDTTM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: medium none;"&gt;09/24/2012 08:50:00&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none;"&gt;09/24/2012 14:56:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: medium none;"&gt;10/07/2012 10:46:00&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none;"&gt;10/07/2012 10:49:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: medium none;"&gt;09/09/2012 10:39:00&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none;"&gt;09/09/2012 12:23:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: medium none;"&gt;08/01/2012 11:36:00&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none;"&gt;08/03/2012 23:06:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: medium none;"&gt;10/06/2012 22:30:00&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none;"&gt;10/08/2012 14:46:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: medium none;"&gt;08/12/2012 15:40:00&lt;/TD&gt;&lt;TD class="xl68" style="border-top: medium none;"&gt;08/12/2012 19:18:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 15:38:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129883#M1326</guid>
      <dc:creator>Mercator</dc:creator>
      <dc:date>2013-03-07T15:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Importing date-time variables from Excel into SAS</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129884#M1327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure which version of SAS or Excel you are using.&amp;nbsp; However, I'm running SAS 9.3 with Excel 2010 (with the xlsx file format).&amp;nbsp; Here is how this can be accomplished:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*libname to excel file.&amp;nbsp; I just placed your example in the root of c*/&lt;/P&gt;&lt;P&gt;libname&amp;nbsp; xlsxfile "c:\exceldatetimefile.xlsx";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*I named the output dataset sheet1.&amp;nbsp; You might want to call it something else.&lt;/P&gt;&lt;P&gt;The dbSASType dataset option is the critical part here.&amp;nbsp; You need to specify to&lt;/P&gt;&lt;P&gt;have SAS read your datetime variables in Excel as datetime format in SAS*/&lt;/P&gt;&lt;P&gt;data sheet1;&lt;/P&gt;&lt;P&gt;set xlsxfile."Sheet1$"n(dbSASType=(HADMDTTM=datetime IADMDTTM=dateTime));&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 16:00:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129884#M1327</guid>
      <dc:creator>mlamias</dc:creator>
      <dc:date>2013-03-07T16:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Importing date-time variables from Excel into SAS</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129885#M1328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It worked! Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Mar 2013 16:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129885#M1328</guid>
      <dc:creator>Mercator</dc:creator>
      <dc:date>2013-03-07T16:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Importing date-time variables from Excel into SAS</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129886#M1329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you please help me when i open up my sas following message comes up..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Cannot open "c:\program files\SAS\SASFoundation\9.2\nls\en\sasv9.cfg"&lt;/P&gt;&lt;P&gt;SAS option '-PATH' not set.&lt;/P&gt;&lt;P&gt;Check configuration file, SAS environment options or command line options.&lt;/P&gt;&lt;P&gt;SAS option '-RESOURCESLOC' not set.&lt;/P&gt;&lt;P&gt;Check configuration file, SAS environment options or command line options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FATAL ERROR: WRCODE=80000803, MODULE='HIINIT': PATH OPTION UNAVAILABLE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Traceback&lt;/P&gt;&lt;P&gt;SASTBTraceBackCtx has been called with a&lt;/P&gt;&lt;P&gt;string ("vacrash") instead of a CONTEXT pointer.&lt;/P&gt;&lt;P&gt;Address&amp;nbsp;&amp;nbsp; Frame&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (DBGHELP API Version 4.0 rev 5)&lt;/P&gt;&lt;P&gt;67EE5DB8&amp;nbsp; 028EFCA4&amp;nbsp; 0001:000D4DB8 sashost.dll&lt;/P&gt;&lt;P&gt;67EE5BD8&amp;nbsp; 028EFCB0&amp;nbsp; 0001:000D4BD8 sashost.dll&lt;/P&gt;&lt;P&gt;67E1D4CA&amp;nbsp; 028EFCD0&amp;nbsp; 0001:0000C4CA sashost.dll&lt;/P&gt;&lt;P&gt;67E11A3F&amp;nbsp; 028EFD28&amp;nbsp; sashost:rtmdoit+0x1E3&lt;/P&gt;&lt;P&gt;67EADB30&amp;nbsp; 028EFD38&amp;nbsp; 0001:0009CB30 sashost.dll&lt;/P&gt;&lt;P&gt;67E3C5BF&amp;nbsp; 028EFD90&amp;nbsp; 0001:0002B5BF sashost.dll&lt;/P&gt;&lt;P&gt;67E3ADA0&amp;nbsp; 028EFDC4&amp;nbsp; 0001:00029DA0 sashost.dll&lt;/P&gt;&lt;P&gt;67E1119D&amp;nbsp; 028EFED0&amp;nbsp; 0001:0000019D sashost.dll&lt;/P&gt;&lt;P&gt;67E17432&amp;nbsp; 0290FF34&amp;nbsp; 0001:00006432 sashost.dll&lt;/P&gt;&lt;P&gt;67E261B5&amp;nbsp; 0290FF5C&amp;nbsp; 0001:000151B5 sashost.dll&lt;/P&gt;&lt;P&gt;67E2237F&amp;nbsp; 0290FF74&amp;nbsp; 0001:0001137F sashost.dll&lt;/P&gt;&lt;P&gt;67E26DE0&amp;nbsp; 0290FF88&amp;nbsp; 0001:00015DE0 sashost.dll&lt;/P&gt;&lt;P&gt;763C1154&amp;nbsp; 0290FF94&amp;nbsp; kernel32:BaseThreadInitThunk+0x12&lt;/P&gt;&lt;P&gt;77B0B299&amp;nbsp; 0290FFD4&amp;nbsp; ntdll:RtlInitializeExceptionChain+0x63&lt;/P&gt;&lt;P&gt;77B0B26C&amp;nbsp; 0290FFEC&amp;nbsp; ntdll:RtlInitializeExceptionChain+0x36&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think something is wrong with config files if you have config files arguments please send me my SAS version is 9.0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Mar 2013 20:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/129886#M1329</guid>
      <dc:creator>Kuldeep</dc:creator>
      <dc:date>2013-03-09T20:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Importing date-time variables from Excel into SAS</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/230989#M1742</link>
      <description>&lt;P&gt;this doesn't work when using it from UNIX sas. log says&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Libref TEST12 was successfully assigned as follows:&lt;/P&gt;&lt;P&gt;Engine: XLSX&lt;/P&gt;&lt;P&gt;Physical Name: /xxxxx/yyyyy.xlsx&lt;/P&gt;&lt;P&gt;24&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;&lt;P&gt;26&lt;/P&gt;&lt;P&gt;27 data sheet1;&lt;/P&gt;&lt;P&gt;28&lt;/P&gt;&lt;P&gt;29 set test12."Sheet1$"n(dbSASType=(HADMDTTM=datetime IADMDTTM=dateTime));&lt;/P&gt;&lt;P&gt;_________&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;ERROR 22-7: Invalid option name DBSASTYPE.&lt;/P&gt;&lt;P&gt;30&lt;/P&gt;&lt;P&gt;31 run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Oct 2015 15:54:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/Importing-date-time-variables-from-Excel-into-SAS/m-p/230989#M1742</guid>
      <dc:creator>bhadrappa_molgi</dc:creator>
      <dc:date>2015-10-21T15:54:14Z</dc:date>
    </item>
  </channel>
</rss>

