<?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 How to verify correct  format for Date of Birth? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-verify-correct-format-for-Date-of-Birth/m-p/627449#M185242</link>
    <description>&lt;P&gt;The data already exist on the table. It is required to verify of Date of Birth is in correct format. Currently&amp;nbsp;Date of Birth field is in&amp;nbsp;$CHAR10. format. It is not required to fix wrong format cases just identify them. The required format is dd/mm/yyyy. How to retrieve output were below mentioned cases doesn't meet format = dd/mm/yyyy. Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample of data:&lt;/P&gt;&lt;P&gt;1963/12/31&lt;/P&gt;&lt;P&gt;31/12/2007&lt;BR /&gt;31/12/2008&lt;BR /&gt;31/12/2009&lt;BR /&gt;31/12/2010&lt;BR /&gt;31/12/2011&lt;BR /&gt;31/12/2012&lt;BR /&gt;31/12/2013&lt;BR /&gt;31/12/2014&lt;BR /&gt;31/12/2015&lt;BR /&gt;31/12/2016&lt;BR /&gt;31/12/2018&lt;BR /&gt;?&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2020 09:46:22 GMT</pubDate>
    <dc:creator>vaidas</dc:creator>
    <dc:date>2020-02-26T09:46:22Z</dc:date>
    <item>
      <title>How to verify correct  format for Date of Birth?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-verify-correct-format-for-Date-of-Birth/m-p/627449#M185242</link>
      <description>&lt;P&gt;The data already exist on the table. It is required to verify of Date of Birth is in correct format. Currently&amp;nbsp;Date of Birth field is in&amp;nbsp;$CHAR10. format. It is not required to fix wrong format cases just identify them. The required format is dd/mm/yyyy. How to retrieve output were below mentioned cases doesn't meet format = dd/mm/yyyy. Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample of data:&lt;/P&gt;&lt;P&gt;1963/12/31&lt;/P&gt;&lt;P&gt;31/12/2007&lt;BR /&gt;31/12/2008&lt;BR /&gt;31/12/2009&lt;BR /&gt;31/12/2010&lt;BR /&gt;31/12/2011&lt;BR /&gt;31/12/2012&lt;BR /&gt;31/12/2013&lt;BR /&gt;31/12/2014&lt;BR /&gt;31/12/2015&lt;BR /&gt;31/12/2016&lt;BR /&gt;31/12/2018&lt;BR /&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 09:46:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-verify-correct-format-for-Date-of-Birth/m-p/627449#M185242</guid>
      <dc:creator>vaidas</dc:creator>
      <dc:date>2020-02-26T09:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to verify correct  format for Date of Birth?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-verify-correct-format-for-Date-of-Birth/m-p/627450#M185243</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/255896"&gt;@vaidas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest that you use the input function, so that SAS try to convert the character value to SAS date value:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
	set have;
	if input(date, ddmmyy10.) ne . then valid_date = 'Y';
	else valid_date = 'N';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-02-26 à 10.56.57.png" style="width: 102px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36401i63C824992AB54CC8/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture d’écran 2020-02-26 à 10.56.57.png" alt="Capture d’écran 2020-02-26 à 10.56.57.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 10:01:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-verify-correct-format-for-Date-of-Birth/m-p/627450#M185243</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-26T10:01:07Z</dc:date>
    </item>
  </channel>
</rss>

