<?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 converting multiple character date into numeric in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/converting-multiple-character-date-into-numeric/m-p/533338#M146212</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;SAS community support is a great resource&amp;nbsp;for me. Than you all.&lt;/P&gt;&lt;P&gt;I need to convert multiple date variables into numeric and this is what I did. Is this right and is there a better efficient way to do this?&lt;/P&gt;&lt;P&gt;/*FIXING CHARACTER DATE INTO NUMERIC DATE 8*/&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SUBMTWO.Labdata29_C;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SUBMTWO.Labdata29_B;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SPECCOLLECTDATE &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;SPECCOLLECTDATE = INPUT (SPEC_COLLECT_DATE, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SPEC_COLLECT_DATE;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SPECCOLLECTDATE=SPEC_COLLECT_DATE;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATETEST_LAB &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATETEST_LAB = INPUT (DATETESTLAB, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATETESTLAB;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATETEST_LAB=DATETESTLAB;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATE_DONE1 &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATE_DONE1 = INPUT (DATEDONE1, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEDONE1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATE_DONE1=DATEDONE1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ETDATE_DONE &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;ETDATE_DONE = INPUT (ETDATEDONE, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ETDATEDONE ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ETDATE_DONE=ETDATEDONE;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_EC &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_EC = INPUT (DATESENTEC, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTEC;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_EC=DATESENTEC;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_GT &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_GT = INPUT (DATESENTGT, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTGT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_GT=DATESENTGT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CLIN &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_CLIN = INPUT (DATESENTCLIN, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTCLIN;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CLIN=DATESENTCLIN;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_PGM &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATEALTCDC_PGM = INPUT (DATEALTCDCPGM, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDCPGM;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_PGM=DATEALTCDCPGM;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_LAB &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATEALTCDC_LAB = INPUT (DATEALTCDCLAB, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDCLAB;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_LAB=DATEALTCDCLAB;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_ARLN &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_ARLN = INPUT (DATESENTARLN, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTARLN;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_ARLN=DATESENTARLN;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CDC &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_CDC = INPUT (DATESENTCDC, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTCDC;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CDC=DATESENTCDC;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Feb 2019 16:55:11 GMT</pubDate>
    <dc:creator>Dhana18</dc:creator>
    <dc:date>2019-02-06T16:55:11Z</dc:date>
    <item>
      <title>converting multiple character date into numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/converting-multiple-character-date-into-numeric/m-p/533338#M146212</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;SAS community support is a great resource&amp;nbsp;for me. Than you all.&lt;/P&gt;&lt;P&gt;I need to convert multiple date variables into numeric and this is what I did. Is this right and is there a better efficient way to do this?&lt;/P&gt;&lt;P&gt;/*FIXING CHARACTER DATE INTO NUMERIC DATE 8*/&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SUBMTWO.Labdata29_C;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SUBMTWO.Labdata29_B;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SPECCOLLECTDATE &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;SPECCOLLECTDATE = INPUT (SPEC_COLLECT_DATE, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SPEC_COLLECT_DATE;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SPECCOLLECTDATE=SPEC_COLLECT_DATE;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATETEST_LAB &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATETEST_LAB = INPUT (DATETESTLAB, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATETESTLAB;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATETEST_LAB=DATETESTLAB;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATE_DONE1 &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATE_DONE1 = INPUT (DATEDONE1, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEDONE1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATE_DONE1=DATEDONE1;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ETDATE_DONE &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;ETDATE_DONE = INPUT (ETDATEDONE, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ETDATEDONE ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ETDATE_DONE=ETDATEDONE;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_EC &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_EC = INPUT (DATESENTEC, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTEC;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_EC=DATESENTEC;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_GT &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_GT = INPUT (DATESENTGT, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTGT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_GT=DATESENTGT;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CLIN &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_CLIN = INPUT (DATESENTCLIN, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTCLIN;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CLIN=DATESENTCLIN;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_PGM &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATEALTCDC_PGM = INPUT (DATEALTCDCPGM, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDCPGM;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_PGM=DATEALTCDCPGM;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_LAB &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATEALTCDC_LAB = INPUT (DATEALTCDCLAB, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDCLAB;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_LAB=DATEALTCDCLAB;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_ARLN &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_ARLN = INPUT (DATESENTARLN, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTARLN;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_ARLN=DATESENTARLN;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CDC &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_CDC = INPUT (DATESENTCDC, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTCDC;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CDC=DATESENTCDC;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 16:55:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/converting-multiple-character-date-into-numeric/m-p/533338#M146212</guid>
      <dc:creator>Dhana18</dc:creator>
      <dc:date>2019-02-06T16:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: converting multiple character date into numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/converting-multiple-character-date-into-numeric/m-p/533339#M146213</link>
      <description>&lt;P&gt;You can use one single format statement, listing all of the variables.&lt;/P&gt;
&lt;P&gt;You can use one single DROP statement, listing all of the variables.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 16:59:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/converting-multiple-character-date-into-numeric/m-p/533339#M146213</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-02-06T16:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: converting multiple character date into numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/converting-multiple-character-date-into-numeric/m-p/533340#M146214</link>
      <description>You could do it with a macro loop for each field that meets your criteria, though I don't see a pattern to the names of your output fields.</description>
      <pubDate>Wed, 06 Feb 2019 17:00:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/converting-multiple-character-date-into-numeric/m-p/533340#M146214</guid>
      <dc:creator>tomrvincent</dc:creator>
      <dc:date>2019-02-06T17:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: converting multiple character date into numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/converting-multiple-character-date-into-numeric/m-p/533350#M146216</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/212762"&gt;@Dhana18&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;SAS community support is a great resource&amp;nbsp;for me. Than you all.&lt;/P&gt;
&lt;P&gt;I need to convert multiple date variables into numeric and this is what I did. Is this right and is there a better efficient way to do this?&lt;/P&gt;
&lt;P&gt;/*FIXING CHARACTER DATE INTO NUMERIC DATE 8*/&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SUBMTWO.Labdata29_C;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SUBMTWO.Labdata29_B;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SPECCOLLECTDATE &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;SPECCOLLECTDATE = INPUT (SPEC_COLLECT_DATE, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SPEC_COLLECT_DATE;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; SPECCOLLECTDATE=SPEC_COLLECT_DATE;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATETEST_LAB &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATETEST_LAB = INPUT (DATETESTLAB, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATETESTLAB;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATETEST_LAB=DATETESTLAB;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATE_DONE1 &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATE_DONE1 = INPUT (DATEDONE1, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEDONE1;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATE_DONE1=DATEDONE1;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ETDATE_DONE &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;ETDATE_DONE = INPUT (ETDATEDONE, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ETDATEDONE ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ETDATE_DONE=ETDATEDONE;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_EC &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_EC = INPUT (DATESENTEC, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTEC;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_EC=DATESENTEC;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_GT &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_GT = INPUT (DATESENTGT, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTGT;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_GT=DATESENTGT;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CLIN &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_CLIN = INPUT (DATESENTCLIN, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTCLIN;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CLIN=DATESENTCLIN;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_PGM &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATEALTCDC_PGM = INPUT (DATEALTCDCPGM, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDCPGM;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_PGM=DATEALTCDCPGM;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_LAB &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATEALTCDC_LAB = INPUT (DATEALTCDCLAB, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDCLAB;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATEALTCDC_LAB=DATEALTCDCLAB;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_ARLN &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_ARLN = INPUT (DATESENTARLN, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTARLN;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_ARLN=DATESENTARLN;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;FORMAT&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CDC &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;DATESENT_CDC = INPUT (DATESENTCDC, &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;YYMMDD10.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;DROP&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENTCDC;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;RENAME&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; DATESENT_CDC=DATESENTCDC;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The code you show is the most efficient way in that you have to read the existing character variable into a new numeric variable and if you want to use(keep) the original name you have to drop and rename as you have done,&amp;nbsp;&amp;nbsp; You can make it a bit easier to code with a macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;124  %let datevars=SPEC_COLLECT_DATE DATETESTLAB DATEDONE1 ETDATEDONE DATESENTEC DATESENTGT DATESENTCLIN DATEALTCDCPGM
124! DATEALTCDCLAB DATESENTARLN DATESENTCDC;
125
126  %macro chr2num(vars=,informat=);
127     %local i w;
128     %let i = %eval(&amp;amp;i+1);
129     %let w = %scan(%superq(vars),&amp;amp;i);
130     %do %while(%superq(w) ne);
131        _x&amp;amp;i = input(&amp;amp;w,&amp;amp;informat);
132        rename _x&amp;amp;i = &amp;amp;w;
133        drop &amp;amp;w;
134        %let i = %eval(&amp;amp;i+1);
135        %let w = %scan(%superq(vars),&amp;amp;i);
136        %end;
137     %mend chr2num;
138
139  options mprint=1;
140  data _null_;
141     %chr2num(vars=&amp;amp;datevars,informat=yymmdd10.);
MPRINT(CHR2NUM):   _x1 = input(SPEC_COLLECT_DATE,yymmdd10.);
MPRINT(CHR2NUM):   rename _x1 = SPEC_COLLECT_DATE;
MPRINT(CHR2NUM):   drop SPEC_COLLECT_DATE;
MPRINT(CHR2NUM):   _x2 = input(DATETESTLAB,yymmdd10.);
MPRINT(CHR2NUM):   rename _x2 = DATETESTLAB;
MPRINT(CHR2NUM):   drop DATETESTLAB;
MPRINT(CHR2NUM):   _x3 = input(DATEDONE1,yymmdd10.);
MPRINT(CHR2NUM):   rename _x3 = DATEDONE1;
MPRINT(CHR2NUM):   drop DATEDONE1;
MPRINT(CHR2NUM):   _x4 = input(ETDATEDONE,yymmdd10.);
MPRINT(CHR2NUM):   rename _x4 = ETDATEDONE;
MPRINT(CHR2NUM):   drop ETDATEDONE;
MPRINT(CHR2NUM):   _x5 = input(DATESENTEC,yymmdd10.);
MPRINT(CHR2NUM):   rename _x5 = DATESENTEC;
MPRINT(CHR2NUM):   drop DATESENTEC;
MPRINT(CHR2NUM):   _x6 = input(DATESENTGT,yymmdd10.);
MPRINT(CHR2NUM):   rename _x6 = DATESENTGT;
MPRINT(CHR2NUM):   drop DATESENTGT;
MPRINT(CHR2NUM):   _x7 = input(DATESENTCLIN,yymmdd10.);
MPRINT(CHR2NUM):   rename _x7 = DATESENTCLIN;
MPRINT(CHR2NUM):   drop DATESENTCLIN;
MPRINT(CHR2NUM):   _x8 = input(DATEALTCDCPGM,yymmdd10.);
MPRINT(CHR2NUM):   rename _x8 = DATEALTCDCPGM;
MPRINT(CHR2NUM):   drop DATEALTCDCPGM;
MPRINT(CHR2NUM):   _x9 = input(DATEALTCDCLAB,yymmdd10.);
MPRINT(CHR2NUM):   rename _x9 = DATEALTCDCLAB;
MPRINT(CHR2NUM):   drop DATEALTCDCLAB;
MPRINT(CHR2NUM):   _x10 = input(DATESENTARLN,yymmdd10.);
MPRINT(CHR2NUM):   rename _x10 = DATESENTARLN;
MPRINT(CHR2NUM):   drop DATESENTARLN;
MPRINT(CHR2NUM):   _x11 = input(DATESENTCDC,yymmdd10.);
MPRINT(CHR2NUM):   rename _x11 = DATESENTCDC;
MPRINT(CHR2NUM):   drop DATESENTCDC;
142     run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Feb 2019 17:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/converting-multiple-character-date-into-numeric/m-p/533350#M146216</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2019-02-06T17:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: converting multiple character date into numeric</title>
      <link>https://communities.sas.com/t5/SAS-Programming/converting-multiple-character-date-into-numeric/m-p/533359#M146219</link>
      <description>&lt;P&gt;If this is going to be an ongoing issue with repeated data sets from a source then I would suggest that you want to consider how you are bringing the data into SAS. Often this sort of conversion is needed due to use of Proc Import which guesses, and sometimes fails, as to variable types.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use of a data step to read an appropriate file format such as CSV, tab or other character delimited or fixed columns means that the data could be read directly into SAS date values and no conversion needed.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Feb 2019 18:30:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/converting-multiple-character-date-into-numeric/m-p/533359#M146219</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-02-06T18:30:05Z</dc:date>
    </item>
  </channel>
</rss>

