<?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: time8 is automatically converted to datetime2 in sql server in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/time8-is-automatically-converted-to-datetime2-in-sql-server/m-p/242646#M45052</link>
    <description>&lt;P&gt;Look at dataset option DBTYPE, something like &lt;STRONG&gt;data destlib.tab(DBTYPE =(myVar='time(7)'));&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jan 2016 04:29:10 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2016-01-11T04:29:10Z</dc:date>
    <item>
      <title>time8 is automatically converted to datetime2 in sql server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/time8-is-automatically-converted-to-datetime2-in-sql-server/m-p/242645#M45051</link>
      <description>&lt;P&gt;sas 9.2, sql server 2008 r2,odbc=sql server native client 10.0&lt;/P&gt;&lt;P&gt;data destlib.tab;&amp;nbsp;&amp;nbsp;&amp;nbsp; --sql server database&lt;/P&gt;&lt;P&gt;set sourcelib.tab;&amp;nbsp; --local sas dataset&lt;/P&gt;&lt;P&gt;run&lt;/P&gt;&lt;P&gt;one column in sourcelib.tab is time8 type with values such as 17:37:33. after running the script above, the column in the sql server database has type datetime2(0) and the value becomes 1960-01-01 17:37:33.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;another system&lt;/P&gt;&lt;P&gt;sas 9.4, sql server 2012, odbc=sql server native client 11.0&lt;/P&gt;&lt;P&gt;same script&lt;/P&gt;&lt;P&gt;the column in the sql server database becomes time(7) with the value 17:37:33.0000000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone please tell me why the first scenario happens and where the control is? Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2016 04:00:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/time8-is-automatically-converted-to-datetime2-in-sql-server/m-p/242645#M45051</guid>
      <dc:creator>xiang</dc:creator>
      <dc:date>2016-01-11T04:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: time8 is automatically converted to datetime2 in sql server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/time8-is-automatically-converted-to-datetime2-in-sql-server/m-p/242646#M45052</link>
      <description>&lt;P&gt;Look at dataset option DBTYPE, something like &lt;STRONG&gt;data destlib.tab(DBTYPE =(myVar='time(7)'));&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2016 04:29:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/time8-is-automatically-converted-to-datetime2-in-sql-server/m-p/242646#M45052</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-01-11T04:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: time8 is automatically converted to datetime2 in sql server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/time8-is-automatically-converted-to-datetime2-in-sql-server/m-p/242652#M45054</link>
      <description>&lt;P&gt;Hi PG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply. Do you know why the first case happened? is it because of some sort of default option?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Xiang&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2016 05:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/time8-is-automatically-converted-to-datetime2-in-sql-server/m-p/242652#M45054</guid>
      <dc:creator>xiang</dc:creator>
      <dc:date>2016-01-11T05:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: time8 is automatically converted to datetime2 in sql server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/time8-is-automatically-converted-to-datetime2-in-sql-server/m-p/242753#M45090</link>
      <description>&lt;P&gt;I don't know. To SAS, TIME. and DATETIME. are representations of the same quantity : the number of seconds since 01JAN1960:00:00:00. I guess things just got more sophisticated between versions 9.2 and 9.4.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jan 2016 16:47:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/time8-is-automatically-converted-to-datetime2-in-sql-server/m-p/242753#M45090</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-01-11T16:47:14Z</dc:date>
    </item>
  </channel>
</rss>

