<?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 extraction from datetime variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-extraction-from-datetime-variable/m-p/759566#M240055</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;my date format is&amp;nbsp;2012-11-06 00:00:00&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data sj.have;
length date $21.;
date = "2012-11-06 00:00:00";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I want just the date from that string in&amp;nbsp; mm/dd/yyyy (for eg: 03/15/1979) format.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 05 Aug 2021 00:03:33 GMT</pubDate>
    <dc:creator>RAVI2000</dc:creator>
    <dc:date>2021-08-05T00:03:33Z</dc:date>
    <item>
      <title>Date extraction from datetime variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-extraction-from-datetime-variable/m-p/759566#M240055</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;my date format is&amp;nbsp;2012-11-06 00:00:00&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data sj.have;
length date $21.;
date = "2012-11-06 00:00:00";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I want just the date from that string in&amp;nbsp; mm/dd/yyyy (for eg: 03/15/1979) format.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 00:03:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-extraction-from-datetime-variable/m-p/759566#M240055</guid>
      <dc:creator>RAVI2000</dc:creator>
      <dc:date>2021-08-05T00:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date extraction from datetime variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-extraction-from-datetime-variable/m-p/759571#M240060</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  datetime = "2012-11-06 00:00:00";
  format date date9.;
  date = input(substr(datetime,1, 10), yymmdd10.);
  put _all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Aug 2021 00:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-extraction-from-datetime-variable/m-p/759571#M240060</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-08-05T00:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Date extraction from datetime variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-extraction-from-datetime-variable/m-p/759652#M240109</link>
      <description>&lt;P&gt;Create a date variable, and apply the fitting format:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sj.have;
length
  date $21
  num_date 4
;
date = "2012-11-06 00:00:00";
num_date = input(scan(date,1),yymmdd10.);
format num_date mmddyy10.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Aug 2021 08:47:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-extraction-from-datetime-variable/m-p/759652#M240109</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-08-05T08:47:24Z</dc:date>
    </item>
  </channel>
</rss>

