<?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: ODS Excel , Yea5. date format in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/471955#M21119</link>
    <description>&lt;P&gt;Thank you for your prompt reply.&lt;/P&gt;&lt;P&gt;I have tried year4. as you have suggested. and is giving the same issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ALi&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jun 2018 00:38:38 GMT</pubDate>
    <dc:creator>Ali_jarmak</dc:creator>
    <dc:date>2018-06-21T00:38:38Z</dc:date>
    <item>
      <title>ODS Excel , Yea5. date format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/471946#M21116</link>
      <description>&lt;P&gt;Dears By using ODS Excel, the below code is giving 2 different results for year5. date format. Proc print is giving the right results , while for proc tabulate is not the case. To simplify the example, I have used a data set with 1 observation only. Any Idea how it can be resolved without creating new variable for year. ALi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data x;
    datex='12jun18'd;
run;

ods EXCEL file="d:\temp\ODSExcel.XLSX" options(sheet_interval="NONE" 
    EMBEDDED_TITLES='ON');

proc print data=x noobs;
    format datex year5.;
    title "Proc Print";
run;

proc tabulate data=x;
    table datex, n;
    class datex;
    format datex year5.;
    Title "Proc Tabulate";
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jun 2018 01:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/471946#M21116</guid>
      <dc:creator>Ali_jarmak</dc:creator>
      <dc:date>2018-06-21T01:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel , Yea5. date format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/471950#M21118</link>
      <description>&lt;P&gt;If you could make that legible it would help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you try YEAR4.?&lt;/P&gt;
&lt;P&gt;I’m not even sure what YEAR5 would mean.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216810"&gt;@Ali_jarmak&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Dears By using ODS Excel, the below code is giving 2 different results for year5. date format. Proc print is giving the right results , while for proc tabulate is not the case. To simplify the example, I have used a data set with 1 observation only. Any Idea how it can be resolved without creating new variable for year. ALi data x; datex='12jun18'd; run; ods EXCEL file="d:\temp\ODSExcel.XLSX" options(sheet_interval="NONE" EMBEDDED_TITLES= 'ON') ; proc print data=x noobs; format datex year5.; title "Proc Print"; run; proc tabulate data=x ; table datex,n; class datex ; format datex year5.; Title "Proc Tabulate"; run; ods excel close;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 00:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/471950#M21118</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-21T00:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel , Yea5. date format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/471955#M21119</link>
      <description>&lt;P&gt;Thank you for your prompt reply.&lt;/P&gt;&lt;P&gt;I have tried year4. as you have suggested. and is giving the same issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ALi&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 00:38:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/471955#M21119</guid>
      <dc:creator>Ali_jarmak</dc:creator>
      <dc:date>2018-06-21T00:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel , Yea5. date format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/471962#M21120</link>
      <description>&lt;P&gt;What version of SAS do you have? ODS EXCEL was pre-production until 9.4 TS1M3 and even then there were still some bugs.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code works for me in 9.4 TS1M5.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can check your version with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc product_status;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216810"&gt;@Ali_jarmak&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you for your prompt reply.&lt;/P&gt;
&lt;P&gt;I have tried year4. as you have suggested. and is giving the same issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ALi&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;PS. I fixed your initial post for you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 01:17:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/471962#M21120</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-21T01:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel , Yea5. date format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/471970#M21121</link>
      <description>&lt;P&gt;Below is the version I'm using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;operating system WX64_WKS.&lt;/P&gt;&lt;P&gt;For Base SAS Software ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Custom version information: 9.4_M3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Image version information: 9.04.01M3P062415&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 03:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/471970#M21121</guid>
      <dc:creator>Ali_jarmak</dc:creator>
      <dc:date>2018-06-21T03:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel , Yea5. date format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/472124#M21124</link>
      <description>&lt;P&gt;Unfortunately that looks like a bug then. Upgrades are free if you have a valid SAS license.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise you can try either rolling your own format - may work - or precalculating the year. There may also be an option to use styles to force it to a text column.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since it's fixed already, there's not much point in reporting it to SAS support either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216810"&gt;@Ali_jarmak&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Below is the version I'm using&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;operating system WX64_WKS.&lt;/P&gt;
&lt;P&gt;For Base SAS Software ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Custom version information: 9.4_M3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Image version information: 9.04.01M3P062415&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 14:52:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/472124#M21124</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-21T14:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel , Yea5. date format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/472154#M21128</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/216810"&gt;@Ali_jarmak&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Dears By using ODS Excel, the below code is giving 2 different results for year5. date format. Proc print is giving the right results , while for proc tabulate is not the case. To simplify the example, I have used a data set with 1 observation only. Any Idea how it can be resolved without creating new variable for year. ALi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data x;
    datex='12jun18'd;
run;

ods EXCEL file="d:\temp\ODSExcel.XLSX" options(sheet_interval="NONE" 
    EMBEDDED_TITLES='ON');

proc print data=x noobs;
    format datex year5.;
    title "Proc Print";
run;

proc tabulate data=x;
    table datex, n;
    class datex;
    format datex year5.;
    Title "Proc Tabulate";
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I am not surprised by anything Excel does that reformats values.&lt;/P&gt;
&lt;P&gt;If you click in the cell with the "year" you will likely see "6/12/2018" in the Proc Print output and note that the Excel "Format Cells" will show on the Number tab that the value is displayed with a "custom" date value of YYYY and an integer value of 43263,&lt;/P&gt;
&lt;P&gt;In the Proc Tabulate you will see "7/11/1965" and an underlying numeric value of 23934. Which is neither the SAS date numeric value of 21347.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The tagsets.excelxp value is appears as expected for the same code.&lt;/P&gt;
&lt;P&gt;So we may have an ODS Excel issue or Excel itself doing something in the background...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jun 2018 15:25:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Yea5-date-format/m-p/472154#M21128</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-21T15:25:35Z</dc:date>
    </item>
  </channel>
</rss>

