<?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: How to add zero for the date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-zero-for-the-date/m-p/697416#M213115</link>
    <description>&lt;P&gt;CATS is a&amp;nbsp;&lt;EM&gt;character&lt;/EM&gt; function, but SAS dates are&amp;nbsp;&lt;EM&gt;numeric&lt;/EM&gt;. SAS dates are a count of days with 1960-01-01 as day zero.&lt;/P&gt;
&lt;P&gt;To create a date from separate year/month/day values, you use the MDY function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;BirthDt = mdy(BirthMonth,BirthDay,BirthYear);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then the format will work (for reasonable values of year).&lt;/P&gt;</description>
    <pubDate>Sun, 08 Nov 2020 07:40:16 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-11-08T07:40:16Z</dc:date>
    <item>
      <title>How to add zero for the date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-zero-for-the-date/m-p/697415#M213114</link>
      <description>&lt;P&gt;Hi SAS Communities,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The original data of Bithmonth and Birthday does not have a leading zero, so if I code in the following way, when I put FORMAT BirthDt MMDDYY10.; some of the data will show up ****. Do you mind telling me how I can add leading zero in my code, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	BirthDt = 	CATS(BirthYear, BirthMonth, BirthDay);
	&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Question.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/51504i1D6F9612B64F56E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Question.jpg" alt="Question.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Valerie&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 15:09:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-zero-for-the-date/m-p/697415#M213114</guid>
      <dc:creator>valerieyim</dc:creator>
      <dc:date>2020-12-10T15:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to add zero for the date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-zero-for-the-date/m-p/697416#M213115</link>
      <description>&lt;P&gt;CATS is a&amp;nbsp;&lt;EM&gt;character&lt;/EM&gt; function, but SAS dates are&amp;nbsp;&lt;EM&gt;numeric&lt;/EM&gt;. SAS dates are a count of days with 1960-01-01 as day zero.&lt;/P&gt;
&lt;P&gt;To create a date from separate year/month/day values, you use the MDY function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;BirthDt = mdy(BirthMonth,BirthDay,BirthYear);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then the format will work (for reasonable values of year).&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 07:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-zero-for-the-date/m-p/697416#M213115</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-11-08T07:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to add zero for the date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-add-zero-for-the-date/m-p/697417#M213116</link>
      <description>&lt;P&gt;Dates are numeric and CATS is applied to character values..&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 07:41:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-add-zero-for-the-date/m-p/697417#M213116</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-11-08T07:41:01Z</dc:date>
    </item>
  </channel>
</rss>

