<?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: SAS date variable help in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669739#M23219</link>
    <description>&lt;P&gt;So I implemented those changes but the Date2 column is still blank and I still get the warning:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Invalid argument to function INPUT at line 30 column 14.&lt;BR /&gt;WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Jul 2020 22:28:33 GMT</pubDate>
    <dc:creator>marleeakerson</dc:creator>
    <dc:date>2020-07-15T22:28:33Z</dc:date>
    <item>
      <title>SAS date variable help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669727#M23217</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need help converting numeric variable to a usable SAS date variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a snippet of the data:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date1&lt;/P&gt;
&lt;P&gt;19370215&lt;BR /&gt;19370215&lt;BR /&gt;19370215&lt;BR /&gt;19700210&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and I want the data to look like this&lt;/P&gt;
&lt;P&gt;Date2&lt;/P&gt;
&lt;P&gt;1937/02/15&lt;BR /&gt;1937/02/15&lt;BR /&gt;1937/02/15&lt;BR /&gt;1970/02/10&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I am using this code:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;Date2 = Input( Put( Date1, z8.), mmddyy10.);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I keep getting this note&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;NOTE: Invalid argument to function INPUT at line 30 column 14.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;And Date2 column is completely blank.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 21:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669727#M23217</guid>
      <dc:creator>marleeakerson</dc:creator>
      <dc:date>2020-07-15T21:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date variable help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669736#M23218</link>
      <description>&lt;P&gt;Your input dates are in the form year-month-day (yymmdd), not month-day-year (mmddyy). So your informat just needed adjusting. Then a format statement will make date2 in the form YYYY/MM/DD.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    format date2 yymmdds10.;
    date2 = input(put(date1, z8.), yymmdd8.);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 22:16:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669736#M23218</guid>
      <dc:creator>mklangley</dc:creator>
      <dc:date>2020-07-15T22:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date variable help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669739#M23219</link>
      <description>&lt;P&gt;So I implemented those changes but the Date2 column is still blank and I still get the warning:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Invalid argument to function INPUT at line 30 column 14.&lt;BR /&gt;WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any advice?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 22:28:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669739#M23219</guid>
      <dc:creator>marleeakerson</dc:creator>
      <dc:date>2020-07-15T22:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date variable help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669740#M23220</link>
      <description>&lt;P&gt;Show us the log, so we can see the code as it appears in the log, plus ALL Notes, WARNINGS and ERRORs.&lt;/P&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Jul 2020 22:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669740#M23220</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-15T22:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date variable help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669742#M23221</link>
      <description>&lt;P&gt;Here is the log:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Invalid argument to function INPUT at line 31 column 14.&lt;BR /&gt;WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.&lt;BR /&gt;&amp;nbsp;Date1=19880202&amp;nbsp; Date_Adjudication=20191011 Claim_Type=M&lt;BR /&gt;Date_Begin_Service_Header=10/01/2019 Date_Billed=10/04/2019 Date_End_Service_Header=10/01/2019 Date_of_Service_YYYYMM=201910&lt;BR /&gt;Date_Begin_Service_Detail=10/01/2019 Date_End_Service_Detail=10/01/2019 Date_of_Service_YYYYMM_DTL=201910&lt;BR /&gt;Date_Birth_Recipient_RID=02/02/1988 Date_Death_Recipient=12/31/9999 Index=B Diag_Code=N179 I_Primary_Diag=Y Birth_DATE=. _ERROR_=1&lt;BR /&gt;_N_=20&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to &lt;BR /&gt;missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;20798726 at 31:14 &lt;BR /&gt;NOTE: There were 20798726 observations read from the data set TABLE.&lt;BR /&gt;NOTE: The data set TABLE has 20798726 observations and 18 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 3:26.59&lt;BR /&gt;cpu time 24.76 seconds&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 22:43:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669742#M23221</guid>
      <dc:creator>marleeakerson</dc:creator>
      <dc:date>2020-07-15T22:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date variable help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669745#M23222</link>
      <description>&lt;P&gt;Show us the log, &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;so we can see the code as it appears in the log&lt;/STRONG&gt;&lt;/FONT&gt;, plus ALL Notes, WARNINGS and ERRORs.&lt;/P&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Jul 2020 22:48:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669745#M23222</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-15T22:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date variable help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669746#M23223</link>
      <description>&lt;P&gt;28 data table;&lt;BR /&gt;29 set table;&lt;BR /&gt;30 format Birth_Date yymmdd10.;&lt;BR /&gt;31 Date2 = Input( Put( &lt;U&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;Date1&lt;/STRONG&gt;&lt;/FONT&gt; &lt;/U&gt;z8.), mmddyy10.);&lt;BR /&gt;32 run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Invalid argument to function INPUT at line 31 column 14.&lt;BR /&gt;WARNING: Limit set by ERRORS= option reached. Further errors of this type will not be printed.&lt;BR /&gt;&amp;nbsp;&lt;FONT color="#800000"&gt;&lt;U&gt;&lt;STRONG&gt;Date1&lt;/STRONG&gt;&lt;/U&gt;&lt;/FONT&gt;=19880202&amp;nbsp; Date_Adjudication=20191011 Claim_Type=M&lt;BR /&gt;Date_Begin_Service_Header=10/01/2019 Date_Billed=10/04/2019 Date_End_Service_Header=10/01/2019 Date_of_Service_YYYYMM=201910&lt;BR /&gt;Date_Begin_Service_Detail=10/01/2019 Date_End_Service_Detail=10/01/2019 Date_of_Service_YYYYMM_DTL=201910&lt;BR /&gt;Date_Birth_Recipient_RID=02/02/1988 Date_Death_Recipient=12/31/9999 Index=B Diag_Code=N179 I_Primary_Diag=Y Birth_DATE=. _ERROR_=1&lt;BR /&gt;_N_=20&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;NOTE: Mathematical operations could not be performed at the following places. The results of the operations have been set to&lt;BR /&gt;missing values.&lt;BR /&gt;Each place is given by: (Number of times) at (Line):(Column).&lt;BR /&gt;20798726 at 31:14&lt;BR /&gt;NOTE: There were 20798726 observations read from the data set TABLE.&lt;BR /&gt;NOTE: The data set TABLE has 20798726 observations and 18 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 3:26.59&lt;BR /&gt;cpu time 24.76 seconds&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 22:54:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669746#M23223</guid>
      <dc:creator>marleeakerson</dc:creator>
      <dc:date>2020-07-15T22:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date variable help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669749#M23225</link>
      <description>&lt;P&gt;The PUT function has a comma between the variable name and the format.&lt;/P&gt;
&lt;DIV id="tap-translate"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Jul 2020 23:19:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669749#M23225</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-15T23:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date variable help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669750#M23226</link>
      <description>&lt;P&gt;You are still trying to read your YY,YYM,MMM numbers as if they were MM,DDY,YYY numbers.&lt;/P&gt;
&lt;P&gt;Change the INFORMAT you are using to read the string generated by the PUT() function.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jul 2020 23:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669750#M23226</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-07-15T23:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS date variable help</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669832#M23235</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Pay attention to details.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In particular, take a close look at the informat that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/223296"&gt;@mklangley&lt;/a&gt;&amp;nbsp;uses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code that we post is usually tested and WORKS with the example data supplied.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also see my notes:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data table;
/* bad idea: overwriting the input dataset */
/* if something untoward happens, your data is destroyed, and you need to recreate it */
set table;
format Birth_Date yymmdd10.;
/* is birth_date already on the dataset? */
/* if not, it will have missing values only, and cause a NOTE */
Date2 = Input( Put( Date1 z8.), mmddyy10.);
/* as already mentioned, wrong informat */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 08:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-date-variable-help/m-p/669832#M23235</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-16T08:21:09Z</dc:date>
    </item>
  </channel>
</rss>

