<?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: Char to Numeric with Date Format in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146820#M2430</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is this what you are after?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; old=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'15.04.2014 10:15'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new=input(old,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;ANYDTDTM23.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; new=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;datetime23.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jun 2014 16:19:39 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2014-06-18T16:19:39Z</dc:date>
    <item>
      <title>Char to Numeric with Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146819#M2429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;i have a field date_in with data type character with value for example '15.04.2014 10:15' (DD.MM.YYY HH:MM)&lt;/P&gt;&lt;P&gt;Target field date_out has numeric type.&lt;/P&gt;&lt;P&gt;Is there any SAS date format which match with this format?&lt;/P&gt;&lt;P&gt;or how i can deliver the date in above format?&lt;/P&gt;&lt;P&gt;I just tried some formats with input(date_in, format) but cannot find the wanted format result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 16:00:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146819#M2429</guid>
      <dc:creator>danimian</dc:creator>
      <dc:date>2014-06-18T16:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric with Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146820#M2430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is this what you are after?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; old=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'15.04.2014 10:15'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new=input(old,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;ANYDTDTM23.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; new=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;datetime23.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 16:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146820#M2430</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-06-18T16:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric with Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146821#M2431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need text &lt;SPAN style="font-family: 'Courier New'; background: white; color: purple;"&gt;'15.04.2014 10:15'&lt;/SPAN&gt; from old in new as date in format DD.MM.YYY HH:MM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 17:03:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146821#M2431</guid>
      <dc:creator>danimian</dc:creator>
      <dc:date>2014-06-18T17:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric with Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146822#M2432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;PROC FORMAT;&lt;BR /&gt;&amp;nbsp; picture dt low-high='%0d.%0m.%0Y %0H:%0M' (datatype=datetime);&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;data _null_;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; old='15.04.2014 10:15';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new=input(old,ANYDTDTM23.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; put new=dt.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 17:49:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146822#M2432</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2014-06-18T17:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric with Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146823#M2433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no out-of box format for your requirement, except you have to make your own:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;format&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;picture&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; cus_dtm &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; low -&amp;nbsp; high&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'%0d.%0m.%Y %0h:%0M'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;datatype&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;=datetime);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; old=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'15.04.2014 10:15'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new=input(old,&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;ANYDTDTM23.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; new=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;cus_dtm20.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jun 2014 17:50:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146823#M2433</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-06-18T17:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric with Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146824#M2434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; Its working fine now. Thanks a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 16:03:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/146824#M2434</guid>
      <dc:creator>danimian</dc:creator>
      <dc:date>2014-06-20T16:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric with Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/385186#M11630</link>
      <description>&lt;P&gt;My current character value is stored as DD.MM.YYY HH:MM. when changing it to the &lt;A href="https://sascertified.wordpress.com/sas-numeric-formats/" target="_blank"&gt;numeric value.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://sascertified.wordpress.com/sas-numeric-formats/" target="_blank"&gt;&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;old='15.04.2014 10:15';&lt;BR /&gt;new=input(old,ANYDTDTM23.);&lt;BR /&gt;put new=datetime23.;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 04:34:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/385186#M11630</guid>
      <dc:creator>kristi_jencks</dc:creator>
      <dc:date>2017-08-04T04:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Char to Numeric with Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/385187#M11631</link>
      <description>&lt;P&gt;One further recommendation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Store the format somewhere permanently, so it's always available, and you don't have to keep redefining it in each SAS session:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format library=corpdata.myfmts;
     picture cus_dtm
           low -  high      =  '%0d.%0m.%Y %0h:%0M'
           (datatype=datetime);
run;

options fmtsearch=(corpdata.myfmts),

data _null_;
     old='15.04.2014 10:15';
     new=input(old,ANYDTDTM23.);
     put new=cus_dtm20.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Aug 2017 06:04:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Char-to-Numeric-with-Date-Format/m-p/385187#M11631</guid>
      <dc:creator>AndrewHowell</dc:creator>
      <dc:date>2017-08-03T06:04:34Z</dc:date>
    </item>
  </channel>
</rss>

