<?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: date time to date format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/date-time-to-date-format/m-p/346960#M80055</link>
    <description>&lt;P&gt;If they are both strings then this is simple string manipulation:&lt;/P&gt;
&lt;PRE&gt;where (a.ARMCD ne "SCRNFAIL") and substr(a.RFSTDTC,1,10) ne b.SCDTC;
&lt;/PRE&gt;
&lt;P&gt;If they are a numeric date-time and a date then simply:&lt;/P&gt;
&lt;PRE&gt;where (a.ARMCD ne "SCRNFAIL") and datepart(a.RFSTDTC) ne b.SCDTC;
&lt;/PRE&gt;</description>
    <pubDate>Tue, 04 Apr 2017 09:05:07 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-04-04T09:05:07Z</dc:date>
    <item>
      <title>date time to date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-time-to-date-format/m-p/346956#M80052</link>
      <description>&lt;P&gt;i have a datetime format variable "2016-09-20T08:29" which is character format and another date "2016-05-04" character.&lt;/P&gt;&lt;P&gt;I need to check if both the dates are same for each record and using the code below.&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table rand_date as&lt;BR /&gt;select a.usubjid,a.RFSTDTC,b.SCDTC&lt;BR /&gt;from sdtm.dm a left join sdtm.sc b&lt;BR /&gt;on a.usubjid=b.usubjid&lt;BR /&gt;where (a.ARMCD ne "SCRNFAIL") and a.RFSTDTC ne b.SCDTC;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But due to different date formats it is not working.&lt;/P&gt;&lt;P&gt;can any one suggest how to proceed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 08:57:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-time-to-date-format/m-p/346956#M80052</guid>
      <dc:creator>alexdsa310</dc:creator>
      <dc:date>2017-04-04T08:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: date time to date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/date-time-to-date-format/m-p/346960#M80055</link>
      <description>&lt;P&gt;If they are both strings then this is simple string manipulation:&lt;/P&gt;
&lt;PRE&gt;where (a.ARMCD ne "SCRNFAIL") and substr(a.RFSTDTC,1,10) ne b.SCDTC;
&lt;/PRE&gt;
&lt;P&gt;If they are a numeric date-time and a date then simply:&lt;/P&gt;
&lt;PRE&gt;where (a.ARMCD ne "SCRNFAIL") and datepart(a.RFSTDTC) ne b.SCDTC;
&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Apr 2017 09:05:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/date-time-to-date-format/m-p/346960#M80055</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-04-04T09:05:07Z</dc:date>
    </item>
  </channel>
</rss>

