<?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/914863#M360524</link>
    <description>&lt;P&gt;Use the RENAME statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  startdate1=input(startdate,yymmdd10.);
  format startdate1 date9.;
  rename startdate=startdate_char startdate1=startdate;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Feb 2024 14:33:47 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-02-07T14:33:47Z</dc:date>
    <item>
      <title>Date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914845#M360511</link>
      <description>For variae startdate I read in 2022-11-30 as text&lt;BR /&gt;Then i do &lt;BR /&gt;Startdate1=input(startdate,yymmdd10.);&lt;BR /&gt;Format startdate1 date9.;&lt;BR /&gt;&lt;BR /&gt;How can i have startdate equals startdate1 as i need this date variable name as startdate not startdate1 but it doesnt work when i do startdate=input(startdate, yymmdd10.) strangely so i am forced to create new variable startdate1&lt;BR /&gt;&lt;BR /&gt;How can i have startdate equals startdate&lt;BR /&gt;I try rename the date format doesnt show as 30Nov2022</description>
      <pubDate>Wed, 07 Feb 2024 12:32:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914845#M360511</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2024-02-07T12:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914846#M360512</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have(rename=(startdate=old_startdate));
    startdate=input(old_startdate,yymmdd10.);
    format startdate date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2024 12:41:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914846#M360512</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-02-07T12:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914854#M360519</link>
      <description>&lt;P&gt;Your code is trying to convert a character variable to a numeric variable (date values are numeric variables) - that's a no-no.&amp;nbsp; That's why&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;renamed the character variable STARTDATE, freeing up the desired name STARTDATE to be generated as a numeric variable.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2024 13:30:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914854#M360519</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2024-02-07T13:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914859#M360521</link>
      <description>If i have many variabke like startdate i need to put in date format&lt;BR /&gt;How to put in all in the rename statement?</description>
      <pubDate>Wed, 07 Feb 2024 13:57:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914859#M360521</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2024-02-07T13:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914862#M360523</link>
      <description>If your data is originally in a file, you can specify the format during import.&lt;BR /&gt;If the data is already loaded into SAS or a database, you could probably write a macro to create the code for you.</description>
      <pubDate>Wed, 07 Feb 2024 14:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914862#M360523</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2024-02-07T14:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914863#M360524</link>
      <description>&lt;P&gt;Use the RENAME statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  startdate1=input(startdate,yymmdd10.);
  format startdate1 date9.;
  rename startdate=startdate_char startdate1=startdate;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2024 14:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-variable/m-p/914863#M360524</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-02-07T14:33:47Z</dc:date>
    </item>
  </channel>
</rss>

