<?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: Writing a datatimecolumn to a table in a SQL library: datetime field overflow error in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/523565#M4644</link>
    <description>&lt;P&gt;Show us the SASLOG for this entire section of code, the entire PROC SQL. Click on the {i} icon and paste that part of the SASLOG into the window that appears.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Dec 2018 17:54:06 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2018-12-26T17:54:06Z</dc:date>
    <item>
      <title>Writing a datatimecolumn to a table in a SQL library: datetime field overflow error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/523555#M4641</link>
      <description>&lt;P&gt;I have a dataset (physical SAS table) on our SAS server. I want to write and store the table in a SQL library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The dataset contains several columns, including a datetime field. For some reason i'm getting the error below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I only insert the first row, it works. So i thought it would be the number of decimals or something...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error:&amp;nbsp;ERROR: During insert: [SAS][ODBC SQL Server Wire Protocol driver]Datetime field overflow. Error in parameter 2. : [SAS][ODBC SQL &lt;BR /&gt; Server Wire Protocol driver]Operation cancelled. Error in parameter 2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample data:&lt;/P&gt;
&lt;P&gt;ALARM_ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ALARM_INITIAL_TIME (format datetime 18.) ALARM_INITIAL_TIME1 (numeric representation of the INITIAL_TIME)&lt;/P&gt;
&lt;P&gt;K0820d7daALRM 24DEC18:00:02:09 1861228929.452&lt;BR /&gt;K0820dc61ALRM 24DEC18:00:00:02 1861228802.38189&lt;BR /&gt;K0820dc62ALRM 24DEC18:00:00:02 1861228802.35839&lt;BR /&gt;K0820dc63ALRM 24DEC18:00:00:02 1861228802.42266&lt;BR /&gt;K0820dc68ALRM 24DEC18:00:00:17 1861228817&lt;BR /&gt;K0820dc69ALRM 24DEC18:00:00:19 1861228819.032&lt;BR /&gt;K0820dc6aALRM 24DEC18:00:00:21 1861228820.50327&lt;BR /&gt;K0820dc6bALRM 24DEC18:00:00:23 1861228823&lt;BR /&gt;K0820dc6cALRM 24DEC18:00:00:23 1861228823&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Dec 2018 16:20:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/523555#M4641</guid>
      <dc:creator>Filipvdr</dc:creator>
      <dc:date>2018-12-26T16:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a datatimecolumn to a table in a SQL library: datetime field overflow error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/523565#M4644</link>
      <description>&lt;P&gt;Show us the SASLOG for this entire section of code, the entire PROC SQL. Click on the {i} icon and paste that part of the SASLOG into the window that appears.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Dec 2018 17:54:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/523565#M4644</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-12-26T17:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a datatimecolumn to a table in a SQL library: datetime field overflow error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/523575#M4651</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can not apply a standard date format directly against a datetime value, there are some date formats you can prefix with 'DT' which will display a datetime as a date. Unfortunately the MMDDYY format is not one of these.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/sql/t-sql/functions/sysdatetime-transact-sql?view=sql-server-2017" target="_self"&gt;https://docs.microsoft.com/en-us/sql/t-sql/functions/sysdatetime-transact-sql?view=sql-server-2017&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Dec 2018 19:07:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/523575#M4651</guid>
      <dc:creator>kishangabani</dc:creator>
      <dc:date>2018-12-26T19:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a datatimecolumn to a table in a SQL library: datetime field overflow error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/523617#M4661</link>
      <description>&lt;P&gt;I just want to keep it as a datetime, not to change it in a date in SQL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does SQL not allow my format?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 08:47:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/523617#M4661</guid>
      <dc:creator>Filipvdr</dc:creator>
      <dc:date>2018-12-27T08:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a datatimecolumn to a table in a SQL library: datetime field overflow error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/523686#M4679</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No, because you should apply datetime format&amp;nbsp; '&lt;STRONG&gt;DATETIME18.' &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;you applied datetime.&lt;/P&gt;&lt;P&gt;&amp;nbsp;that is why your datetime column is overflow.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Dec 2018 18:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/523686#M4679</guid>
      <dc:creator>kishangabani</dc:creator>
      <dc:date>2018-12-27T18:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a datatimecolumn to a table in a SQL library: datetime field overflow error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/525391#M4959</link>
      <description>still same error:&lt;BR /&gt;&lt;BR /&gt;data temp;&lt;BR /&gt; format alarm_initial_time datetime18.;&lt;BR /&gt; set temp_am.query_filip_temp;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;data al1bd_01.temp_datetime;&lt;BR /&gt; set temp;&lt;BR /&gt;run;&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Jan 2019 13:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/525391#M4959</guid>
      <dc:creator>Filipvdr</dc:creator>
      <dc:date>2019-01-08T13:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Writing a datatimecolumn to a table in a SQL library: datetime field overflow error</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/525472#M4979</link>
      <description>&lt;P&gt;I have created small example for you. I hope you it goes well.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
	input x datetime.;
	format x datetime18.;
	cards;
25DEC18:00:02:09
;
run;

proc sql;
	insert into test values ('26DEC18:00:02:09'dt);
quit;

proc print data=work.test;
	format x datetime18.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I also used one PROC SQL. so, it's 18 length of datetime.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2019 16:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-a-datatimecolumn-to-a-table-in-a-SQL-library-datetime/m-p/525472#M4979</guid>
      <dc:creator>kishangabani</dc:creator>
      <dc:date>2019-01-08T16:26:54Z</dc:date>
    </item>
  </channel>
</rss>

