<?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: Export to CSV : some records have correct date, some not in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Export-to-CSV-some-records-have-correct-date-some-not/m-p/630568#M186678</link>
    <description>Thank for your help Reeza!  I think I may got the right solution. I will test it tomorrow. Finger crossed!</description>
    <pubDate>Mon, 09 Mar 2020 03:30:50 GMT</pubDate>
    <dc:creator>Suzy_Cat</dc:creator>
    <dc:date>2020-03-09T03:30:50Z</dc:date>
    <item>
      <title>Export to CSV : some records have correct date, some not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-to-CSV-some-records-have-correct-date-some-not/m-p/630562#M186675</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Need advice on why the dates showing incorrect when exported to csv. The data looks absolutely fine in SAS but some random lines would show incorrect dates "mm/dd/yyyy" where it should be "dd/mm/yyyy". Most of the records still have correct date. It is really annoying. Hope some one can shed me some light here &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in excel,&amp;nbsp;the first line&amp;nbsp;looks normal as 02/01/2018, but it is wrong, in SAS the correct date is 01 Feb 2018.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.JPG" style="width: 153px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36698iC5E4F95B25C9EC55/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.JPG" alt="Capture1.JPG" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When this issue occurred, you can always found there are two sets of data there:&lt;/P&gt;
&lt;P&gt;one is selectable by year/month/date, the other one can only be selected by the date itself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.JPG" style="width: 187px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36700i3CBF9D308C1724F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 02:53:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-to-CSV-some-records-have-correct-date-some-not/m-p/630562#M186675</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2020-03-09T02:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: Export to CSV : some records have correct date, some not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-to-CSV-some-records-have-correct-date-some-not/m-p/630566#M186676</link>
      <description>Excel is changing the datatype when you open it in Excel. To avoid this issue, open Excel, go to the Data tab&amp;gt;Import txt/CSV file. There's a button to say don't guess at types, select that and then format the data the way you need it. &lt;BR /&gt;&lt;BR /&gt;Or export your data straight to Excel and it should avoid the issue altogether. &lt;BR /&gt;&lt;BR /&gt;Or try changing the export format from SAS to be mmddyy as that's what Excel likes.</description>
      <pubDate>Mon, 09 Mar 2020 03:08:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-to-CSV-some-records-have-correct-date-some-not/m-p/630566#M186676</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-03-09T03:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Export to CSV : some records have correct date, some not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-to-CSV-some-records-have-correct-date-some-not/m-p/630568#M186678</link>
      <description>Thank for your help Reeza!  I think I may got the right solution. I will test it tomorrow. Finger crossed!</description>
      <pubDate>Mon, 09 Mar 2020 03:30:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-to-CSV-some-records-have-correct-date-some-not/m-p/630568#M186678</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2020-03-09T03:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Export to CSV : some records have correct date, some not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-to-CSV-some-records-have-correct-date-some-not/m-p/630795#M186788</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks heaps for your help. You have pointed me out to the right direction.! How awesome is that... could not imagine if I don't have an answer to deal with the issue (was really annoying).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I have replaced all dates format from ddmmyy10. to date9. in SAS. Looks like the exported data are perfectly fine now in excel &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 04:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-to-CSV-some-records-have-correct-date-some-not/m-p/630795#M186788</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2020-03-10T04:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Export to CSV : some records have correct date, some not</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Export-to-CSV-some-records-have-correct-date-some-not/m-p/631151#M186959</link>
      <description>&lt;P&gt;Further more, in case any one may be interested, it is similar when using format mmyy5.(or mmyy7.)&lt;/P&gt;
&lt;P&gt;I have found using format monyy7. is way more better if there is need to export to CSV/EXCEL.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 04:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Export-to-CSV-some-records-have-correct-date-some-not/m-p/631151#M186959</guid>
      <dc:creator>Suzy_Cat</dc:creator>
      <dc:date>2020-03-11T04:14:56Z</dc:date>
    </item>
  </channel>
</rss>

