<?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: script in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/script/m-p/609276#M17859</link>
    <description>Thank you so much, this worked</description>
    <pubDate>Wed, 04 Dec 2019 06:33:05 GMT</pubDate>
    <dc:creator>Dumi1</dc:creator>
    <dc:date>2019-12-04T06:33:05Z</dc:date>
    <item>
      <title>script</title>
      <link>https://communities.sas.com/t5/New-SAS-User/script/m-p/608670#M17727</link>
      <description>&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;whats the script to change format of Year? I need it to be yyyymmdd on my excel sheet because currently its mmddyyyy. I tried changing it on excel but it doesn't change so I was wondering if I can import the excel in sas and change the format from there?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 11:08:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/script/m-p/608670#M17727</guid>
      <dc:creator>Dumi1</dc:creator>
      <dc:date>2019-12-02T11:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://communities.sas.com/t5/New-SAS-User/script/m-p/608676#M17731</link>
      <description>&lt;UL&gt;
&lt;LI&gt;Please use descriptive subject lines. "script" is NOT descriptive.&lt;/LI&gt;
&lt;LI&gt;Show us what your SAS data looks like, post it in a data step with data lines&lt;/LI&gt;
&lt;LI&gt;How data ends up in Excel is dependent upon how you export it to Excel, and upon settings there, especially the Windows locale.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 02 Dec 2019 11:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/script/m-p/608676#M17731</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-12-02T11:30:28Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://communities.sas.com/t5/New-SAS-User/script/m-p/608684#M17734</link>
      <description>&lt;P&gt;You can use ODS as in the example below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*%let path=/home/user/4tests/;
%let path=c:\temp\;

data sample(drop=_:);
  length cdate 8;
  _cdate=today();
  do _i=0 to 4;
    cdate=_cdate-100*_i;
    /* correct for the excel date */
    cdate + 21916;
    if _i=2 then call missing(cdate);
    output;
  end;
  stop;
run;

options missing=' ';
ods listing close;
ods excel file="&amp;amp;path.test.xlsx";
proc report data=sample;
  column cdate;
  define cdate/display 'Date Collected' format=yyyymmdd10. style(column)={cellwidth=1.5in tagattr='format: yyyymmdd'};
run;
ods excel close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Dec 2019 12:02:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/script/m-p/608684#M17734</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2019-12-02T12:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://communities.sas.com/t5/New-SAS-User/script/m-p/608686#M17735</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/295563"&gt;@Dumi1&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;In case in your Excel file, the date is recognized as a character expression (e.g. "12022019") then you can use a function like this:&lt;/P&gt;
&lt;P&gt;=&lt;SPAN&gt;CONCATENATE&lt;/SPAN&gt;(&lt;SPAN&gt;MID&lt;/SPAN&gt;(&lt;FONT color="#FF00FF"&gt;A1&lt;/FONT&gt;;5;4);&lt;SPAN&gt;MID&lt;/SPAN&gt;(&lt;FONT color="#FF00FF"&gt;A1&lt;/FONT&gt;;1;2);&lt;SPAN&gt;MID&lt;/SPAN&gt;(&lt;FONT color="#FF00FF"&gt;A1&lt;/FONT&gt;;3;2))&lt;/P&gt;
&lt;P&gt;It will return a character expression like "20191202".&lt;/P&gt;
&lt;P&gt;MID() is equivalent to substr() in SAS.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 12:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/script/m-p/608686#M17735</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2019-12-02T12:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://communities.sas.com/t5/New-SAS-User/script/m-p/609276#M17859</link>
      <description>Thank you so much, this worked</description>
      <pubDate>Wed, 04 Dec 2019 06:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/script/m-p/609276#M17859</guid>
      <dc:creator>Dumi1</dc:creator>
      <dc:date>2019-12-04T06:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: script</title>
      <link>https://communities.sas.com/t5/New-SAS-User/script/m-p/609278#M17860</link>
      <description>Thank you, I also tested this and it worked perfectly and it made me look very clever.</description>
      <pubDate>Wed, 04 Dec 2019 06:34:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/script/m-p/609278#M17860</guid>
      <dc:creator>Dumi1</dc:creator>
      <dc:date>2019-12-04T06:34:19Z</dc:date>
    </item>
  </channel>
</rss>

