<?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 format yyyymmdd to a date format ? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-convert-character-format-yyyymmdd-to-a-date-format/m-p/188997#M3897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works for me.&lt;/P&gt;&lt;P&gt;A SAS date value gets stored in a numeric variable as number of days since 01Jan1960 with a format attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; birthd='19890629';&lt;/P&gt;&lt;P&gt;&amp;nbsp; date_new = input(birthd, yymmdd8.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; format date_new date10.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jan 2014 21:31:09 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2014-01-06T21:31:09Z</dc:date>
    <item>
      <title>How to convert character format yyyymmdd to a date format ?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-convert-character-format-yyyymmdd-to-a-date-format/m-p/188996#M3896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt; I have one variable 'birthd' that shows value in character format (e.g. 19890629). I want to convert that into a date variable mmddyy in the same file work.test.&lt;/P&gt;&lt;P&gt;Attached is the below code - the variable date_new shows up as numeric instead of date format.&lt;/P&gt;&lt;P&gt;Much help appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Neil.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;WORK.merged;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;WORK.merged_COPY;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;date_new = input(birthd, &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;yymmdd8.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;format &lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;date_new &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;date10.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="line-height: 115%; color: navy; font-size: 10pt; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="background: white; color: black; line-height: 115%; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 20:51:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-convert-character-format-yyyymmdd-to-a-date-format/m-p/188996#M3896</guid>
      <dc:creator>Neil_C</dc:creator>
      <dc:date>2014-01-06T20:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character format yyyymmdd to a date format ?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-convert-character-format-yyyymmdd-to-a-date-format/m-p/188997#M3897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works for me.&lt;/P&gt;&lt;P&gt;A SAS date value gets stored in a numeric variable as number of days since 01Jan1960 with a format attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp; birthd='19890629';&lt;/P&gt;&lt;P&gt;&amp;nbsp; date_new = input(birthd, yymmdd8.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; format date_new date10.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 21:31:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-convert-character-format-yyyymmdd-to-a-date-format/m-p/188997#M3897</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-01-06T21:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character format yyyymmdd to a date format ?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-convert-character-format-yyyymmdd-to-a-date-format/m-p/188998#M3898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean by numeric rather than date format?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS has only two variable types, numbers and characters and a "date" variable is a number with a date format, specifically the number of days from Jan 1, 1960. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jan 2014 21:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-convert-character-format-yyyymmdd-to-a-date-format/m-p/188998#M3898</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-01-06T21:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character format yyyymmdd to a date format ?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-convert-character-format-yyyymmdd-to-a-date-format/m-p/188999#M3899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want the dates to display in month,day, year format then use a format that will do that.&amp;nbsp; For example for today (06JAN2014)&amp;nbsp; to display as 06012014 you would use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; background-color: white; color: blue;"&gt;format &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;date_new &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; background-color: white; color: teal;"&gt;mmddyyn8.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Courier New'; background-color: white; color: black;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jan 2014 00:55:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-convert-character-format-yyyymmdd-to-a-date-format/m-p/188999#M3899</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-01-07T00:55:53Z</dc:date>
    </item>
  </channel>
</rss>

