<?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 date format in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/607724#M18459</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have problem with date variable. I want to have format DD/MM/YYYY.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code which doesn't work (date format is BEST12.):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA xxx;
   INPUT quantity date DDMMYY10. id;
   DATALINES;
   59 01/01/2009 3
   59 01/02/2009 2
   59 01/03/2009 1
;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2019 15:11:23 GMT</pubDate>
    <dc:creator>ab97_cd</dc:creator>
    <dc:date>2019-11-27T15:11:23Z</dc:date>
    <item>
      <title>date format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/607724#M18459</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have problem with date variable. I want to have format DD/MM/YYYY.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code which doesn't work (date format is BEST12.):&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA xxx;
   INPUT quantity date DDMMYY10. id;
   DATALINES;
   59 01/01/2009 3
   59 01/02/2009 2
   59 01/03/2009 1
;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 15:11:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/607724#M18459</guid>
      <dc:creator>ab97_cd</dc:creator>
      <dc:date>2019-11-27T15:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: date format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/607727#M18460</link>
      <description>&lt;P&gt;Use the proper format, DDMMYYS10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA xxx;
   infile cards missover;
   INPUT quantity date DDMMYY10.;
   format date ddmmyys10.;
   DATALINES;
   59 01/01/2009 
   59 01/02/2009 
   59 01/03/2009 
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2019 15:12:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/607727#M18460</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-27T15:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: date format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/607729#M18461</link>
      <description>&lt;P&gt;Further to the solution provided by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;, more details can be found in the documentation, including for data that uses another separator for dates:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=ds2ref&amp;amp;docsetTarget=p1uyobuitxtzhwn10vu2ri4v0p00.htm&amp;amp;docsetVersion=3.1&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=ds2ref&amp;amp;docsetTarget=p1uyobuitxtzhwn10vu2ri4v0p00.htm&amp;amp;docsetVersion=3.1&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 15:16:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/607729#M18461</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2019-11-27T15:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: date format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/607733#M18462</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/297212"&gt;@ab97_cd&lt;/a&gt;&amp;nbsp; &amp;nbsp;Your code works fine. An addition of a format statement to display SAS dates makes it convenient for reading ease.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA xxx;
   INPUT quantity date DDMMYY10. id;
   format date ddmmyy10.;
   DATALINES;
   59 01/01/2009 3
   59 01/02/2009 2
   59 01/03/2009 1
; 

proc print noobs;run;

quantity date id 
59 01/01/2009 3 
59 01/02/2009 2 
59 01/03/2009 1 

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2019 15:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/607733#M18462</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-11-27T15:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: date format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/607735#M18463</link>
      <description>&lt;P&gt;Use the colon modifier, or the format will override the delimiters.&lt;/P&gt;
&lt;P&gt;Also assign a date &lt;STRONG&gt;displa&lt;/STRONG&gt;y format when using an &lt;STRONG&gt;in&lt;/STRONG&gt;format:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data xxx;
input quantity date :DDMMYY10. id;
format date ddmmyy10.;
datalines;
59 01/01/2009 3
59 01/02/2009 2
59 01/03/2009 1
; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The ddmmyy informat accepts all kinds of separators: colons, dashes, slashes, underlines, periods:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input date :ddmmyy10.;
format date yymmddd10.;
datalines;
27.11.2019
27/11/2019
27-11-2019
27_11_2019
27:11:2019
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2019 15:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/607735#M18463</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-11-27T15:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: date format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/705570#M19696</link>
      <description>&lt;P&gt;You will need to use the DDMMYYS10. format. This tells SAS you want to have 10 characters (including the slashes) in your date and the "S" says to use slashes in the format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will need a format statement before the datelines statement that looks like:&lt;/P&gt;&lt;P&gt;Format date DDMMYYS10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 02:59:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/date-format/m-p/705570#M19696</guid>
      <dc:creator>Krissy217</dc:creator>
      <dc:date>2020-12-14T02:59:17Z</dc:date>
    </item>
  </channel>
</rss>

