<?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  convert character YYYY-mm-dd HH:MM:SS to date format and overwrite old variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-character-YYYY-mm-dd-HH-MM-SS-to-date-format-and/m-p/492972#M129660</link>
    <description>&lt;P&gt;You can't overwrite the original variable without some trickery, because you want to replace a character variable with a numeric value.&amp;nbsp; (Dates are numeric in SAS.)&amp;nbsp; So here's a way that accomplishes that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;app_dt = scan(app_dt, 1, ' ');&lt;/P&gt;
&lt;P&gt;tempdate = input(app_dt, yymmdd10.);&lt;/P&gt;
&lt;P&gt;format tempdate yymmdd10.;&lt;/P&gt;
&lt;P&gt;drop app_dt;&lt;/P&gt;
&lt;P&gt;rename tempdate = app_dt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Sep 2018 12:08:56 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2018-09-06T12:08:56Z</dc:date>
    <item>
      <title>how to  convert character YYYY-mm-dd HH:MM:SS to date format and overwrite old variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-character-YYYY-mm-dd-HH-MM-SS-to-date-format-and/m-p/492970#M129659</link>
      <description>&lt;P&gt;how to convert character YYYY-mm-dd HH:MM:ss to date format&amp;nbsp; and overwrite old variables.&lt;/P&gt;&lt;P&gt;table is like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;id&lt;/TD&gt;&lt;TD&gt;app_dt&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;101&lt;/TD&gt;&lt;TD&gt;2015/6/8 13:24:01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;102&lt;/TD&gt;&lt;TD&gt;2016/11/2 9:11:12&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;103&lt;/TD&gt;&lt;TD&gt;2016/3/2 21:21:23&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 06 Sep 2018 12:04:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-character-YYYY-mm-dd-HH-MM-SS-to-date-format-and/m-p/492970#M129659</guid>
      <dc:creator>ccnky123</dc:creator>
      <dc:date>2018-09-06T12:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: how to  convert character YYYY-mm-dd HH:MM:SS to date format and overwrite old variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-convert-character-YYYY-mm-dd-HH-MM-SS-to-date-format-and/m-p/492972#M129660</link>
      <description>&lt;P&gt;You can't overwrite the original variable without some trickery, because you want to replace a character variable with a numeric value.&amp;nbsp; (Dates are numeric in SAS.)&amp;nbsp; So here's a way that accomplishes that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;app_dt = scan(app_dt, 1, ' ');&lt;/P&gt;
&lt;P&gt;tempdate = input(app_dt, yymmdd10.);&lt;/P&gt;
&lt;P&gt;format tempdate yymmdd10.;&lt;/P&gt;
&lt;P&gt;drop app_dt;&lt;/P&gt;
&lt;P&gt;rename tempdate = app_dt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2018 12:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-convert-character-YYYY-mm-dd-HH-MM-SS-to-date-format-and/m-p/492972#M129660</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-09-06T12:08:56Z</dc:date>
    </item>
  </channel>
</rss>

