<?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 convert birthdate to iso8601 format for character variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/convert-birthdate-to-iso8601-format-for-character-variable/m-p/693705#M211565</link>
    <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;I have a birth variable in a dataset which is character type. Now I want to convert into is8601da. format. First I created another variable to change the birth variable to numeric and then use the put function to apply the format. I have tried the below code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;birth1=input(birth,anydtdtm20.);&lt;BR /&gt;BRTHDTC=put(birth1,is8601da.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;birth variable format in the dataset ::::1988-08-29&lt;/P&gt;&lt;P&gt;I&amp;nbsp;got&amp;nbsp; ********** this for BRTHDTC. What am I doing wrong? Can anybody help me with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Oct 2020 12:03:28 GMT</pubDate>
    <dc:creator>sas1018</dc:creator>
    <dc:date>2020-10-23T12:03:28Z</dc:date>
    <item>
      <title>convert birthdate to iso8601 format for character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-birthdate-to-iso8601-format-for-character-variable/m-p/693705#M211565</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;I have a birth variable in a dataset which is character type. Now I want to convert into is8601da. format. First I created another variable to change the birth variable to numeric and then use the put function to apply the format. I have tried the below code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;birth1=input(birth,anydtdtm20.);&lt;BR /&gt;BRTHDTC=put(birth1,is8601da.);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;birth variable format in the dataset ::::1988-08-29&lt;/P&gt;&lt;P&gt;I&amp;nbsp;got&amp;nbsp; ********** this for BRTHDTC. What am I doing wrong? Can anybody help me with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TIA.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 12:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-birthdate-to-iso8601-format-for-character-variable/m-p/693705#M211565</guid>
      <dc:creator>sas1018</dc:creator>
      <dc:date>2020-10-23T12:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: convert birthdate to iso8601 format for character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-birthdate-to-iso8601-format-for-character-variable/m-p/693708#M211566</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
    birth='1988-08-29';
	birth_numeric=input(birth,anydtdte.);
	format birth_numeric is8601da.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You can't use informat anydtdtm. because that expects date/time values, and you have only a date value, so you need informat anydtdte.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 12:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-birthdate-to-iso8601-format-for-character-variable/m-p/693708#M211566</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-10-23T12:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: convert birthdate to iso8601 format for character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convert-birthdate-to-iso8601-format-for-character-variable/m-p/693723#M211574</link>
      <description>&lt;P&gt;Here is a useful reference regarding dates, times and datetimes in SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt; has a PDF with much information about dates.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 13:44:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convert-birthdate-to-iso8601-format-for-character-variable/m-p/693723#M211574</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-23T13:44:45Z</dc:date>
    </item>
  </channel>
</rss>

