<?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: date variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/341775#M78281</link>
    <description>&lt;P&gt;Data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End_of_study = '31DEC2012'd;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; format End_of_study ddmmyy10.;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that SAS only accepts one way to assign a date literal if you want to use it as a date value allowing use of the various date functions and formats.&lt;/P&gt;
&lt;P&gt;Otherwise use a character value any way you want it.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Mar 2017 21:15:32 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-03-16T21:15:32Z</dc:date>
    <item>
      <title>date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/341770#M78278</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone tell me how to create a new variable named 'End_of_study' in the format 31/12/2012, which has to be the same for all entries/rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 21:06:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/341770#M78278</guid>
      <dc:creator>Tawfiq</dc:creator>
      <dc:date>2017-03-16T21:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/341772#M78279</link>
      <description>&lt;P&gt;This question, and a lot more, can be learned in the free online SAS Programming course.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 21:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/341772#M78279</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-03-16T21:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/341774#M78280</link>
      <description>&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;retain End_of_Study '31Dec2012'd;&lt;/P&gt;
&lt;P&gt;format End_of_Study ddmmyys10.;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 21:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/341774#M78280</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-03-16T21:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/341775#M78281</link>
      <description>&lt;P&gt;Data want;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End_of_study = '31DEC2012'd;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; format End_of_study ddmmyy10.;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that SAS only accepts one way to assign a date literal if you want to use it as a date value allowing use of the various date functions and formats.&lt;/P&gt;
&lt;P&gt;Otherwise use a character value any way you want it.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 21:15:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/341775#M78281</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-03-16T21:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/341797#M78290</link>
      <description>&lt;P&gt;Just a heads up to the free SAS training available that has been alluded to:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/training/tutorial/" target="_blank"&gt;http://support.sas.com/training/tutorial/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 22:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/341797#M78290</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-16T22:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342443#M78523</link>
      <description>&lt;P&gt;Thanks all of you for the support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've come accross another question. I've imported a date variable from excell; but the format for the date variable is in text and perhaps this is why the missing values are not marked in "." BUT are just blank cells in SAS Viewtable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I appreciate if someone can advise on how to format the text to sas date value (such as 01/12/2011)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tawfiq&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 02:27:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342443#M78523</guid>
      <dc:creator>Tawfiq</dc:creator>
      <dc:date>2017-03-20T02:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342497#M78535</link>
      <description>&lt;P&gt;What do,the date values look like now?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;new_var = input (date_var, current_format.);&lt;/P&gt;
&lt;P&gt;formate new_var ddmmyy10.;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 09:22:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342497#M78535</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-20T09:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342763#M78595</link>
      <description>Hi Reeza,&lt;BR /&gt;&lt;BR /&gt;The variable is Last_date (see below). It's format is $10. My purpose is to&lt;BR /&gt;change it to numeric so that the blank rows will be filled with (.) or&lt;BR /&gt;missing values and the date format (ddmmyy10.) would allow me to use this&lt;BR /&gt;variable for creating new vars.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Last_date&lt;BR /&gt;&lt;BR /&gt;01/12/2011&lt;BR /&gt;&lt;BR /&gt;05/08/2010&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I used&lt;BR /&gt;&lt;BR /&gt;LRec_date=input (Last_date, $10.);&lt;BR /&gt;format LRec_date ddmmyy10.;&lt;BR /&gt;&lt;BR /&gt;BUT the error message is this (The format $ddmmyy was not found or could&lt;BR /&gt;not be loaded)</description>
      <pubDate>Mon, 20 Mar 2017 20:40:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342763#M78595</guid>
      <dc:creator>Tawfiq</dc:creator>
      <dc:date>2017-03-20T20:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342777#M78596</link>
      <description>&lt;P&gt;Your code:&lt;/P&gt;
&lt;P&gt;LRec_date=input (Last_date, $10.);&lt;BR /&gt;format LRec_date ddmmyy10.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Creates a text variable, that is what input using the informat $10. does.&lt;/P&gt;
&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LRec_date=input (Last_date, ddmmyy10.);&lt;BR /&gt;format LRec_date ddmmyy10.;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 22:19:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342777#M78596</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-03-20T22:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342781#M78599</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/132766"&gt;@Tawfiq&lt;/a&gt;&amp;nbsp;Sorry, current format, means how it currently appears ie mmddyy, not the $10.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;solution is correct.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 22:37:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342781#M78599</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-20T22:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342803#M78606</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works. Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 01:33:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-variable/m-p/342803#M78606</guid>
      <dc:creator>Tawfiq</dc:creator>
      <dc:date>2017-03-21T01:33:04Z</dc:date>
    </item>
  </channel>
</rss>

