<?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 quarter to dates in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/685996#M37071</link>
    <description>Have a dataset with a quarter variable like below:&lt;BR /&gt;&lt;BR /&gt;Quarter&lt;BR /&gt;202009&lt;BR /&gt;202003&lt;BR /&gt;202003&lt;BR /&gt;202006&lt;BR /&gt;&lt;BR /&gt;Is there a way to convert this to a date? Ideally something like ddmmmyy&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Wed, 23 Sep 2020 11:15:58 GMT</pubDate>
    <dc:creator>ywon111</dc:creator>
    <dc:date>2020-09-23T11:15:58Z</dc:date>
    <item>
      <title>Convert quarter to dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/685996#M37071</link>
      <description>Have a dataset with a quarter variable like below:&lt;BR /&gt;&lt;BR /&gt;Quarter&lt;BR /&gt;202009&lt;BR /&gt;202003&lt;BR /&gt;202003&lt;BR /&gt;202006&lt;BR /&gt;&lt;BR /&gt;Is there a way to convert this to a date? Ideally something like ddmmmyy&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 23 Sep 2020 11:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/685996#M37071</guid>
      <dc:creator>ywon111</dc:creator>
      <dc:date>2020-09-23T11:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Convert quarter to dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686000#M37072</link>
      <description>&lt;P&gt;Are these numeric values? Are these formatted as yymmn6.? Are they character values?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Depending on your answers above, the method to convert to dates changes.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 11:32:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686000#M37072</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-23T11:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: Convert quarter to dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686003#M37073</link>
      <description>They are not formatted. Importing from an excel and all it displays in&lt;BR /&gt;excel is 202009 (example). Thanks ##- Please type your reply above this&lt;BR /&gt;line. No attachments. -##</description>
      <pubDate>Wed, 23 Sep 2020 11:35:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686003#M37073</guid>
      <dc:creator>ywon111</dc:creator>
      <dc:date>2020-09-23T11:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Convert quarter to dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686005#M37074</link>
      <description>&lt;P&gt;But I don't care how it displays in Excel. Is that how it displays in SAS? Is it numeric or character in SAS?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 11:37:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686005#M37074</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-23T11:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: Convert quarter to dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686031#M37075</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/323303"&gt;@ywon111&lt;/a&gt;&amp;nbsp; ,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp; is asking for the metadata/descriptor info or in other words properties of your sas dataset that was created by importing the contents of the excel file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To view the descriptor portion, you would need to run&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;proc contents data=&lt;STRONG&gt;your_sasdataset;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;run&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output of proc contents would contain whether your quarter variable is numeric or char and other info. Please provide that info and then based upon which the SAS community would recommend your much needed solution. Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 13:11:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686031#M37075</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-09-23T13:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert quarter to dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686053#M37079</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/323303"&gt;@ywon111&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Have a dataset with a quarter variable like below:&lt;BR /&gt;&lt;BR /&gt;Quarter&lt;BR /&gt;202009&lt;BR /&gt;202003&lt;BR /&gt;202003&lt;BR /&gt;202006&lt;BR /&gt;&lt;BR /&gt;Is there a way to convert this to a date? Ideally something like ddmmmyy&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes there is a way. Assuming the value you show is actually YYYYMM (not quarter but month). However the approach varies depending on 1) whether the value after you brought it into SAS is character or numeric&amp;nbsp;&amp;nbsp; and 2) which particular date, which must include a day of the month, you want. The simplest SAS tools would assume that you want to create the first date of the calendar quarter such as 01/09/2020. If you expect something else from 202009 then you need to specify it.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 14:21:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686053#M37079</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-09-23T14:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert quarter to dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686212#M37084</link>
      <description>It's displayed as numeric in SAS.&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 23 Sep 2020 20:53:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686212#M37084</guid>
      <dc:creator>ywon111</dc:creator>
      <dc:date>2020-09-23T20:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Convert quarter to dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686246#M37085</link>
      <description>&lt;P&gt;It's formatted as numeric in SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From proc contents: Format: BEST12.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2020 23:17:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686246#M37085</guid>
      <dc:creator>ywon111</dc:creator>
      <dc:date>2020-09-23T23:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Convert quarter to dates</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686286#M37089</link>
      <description>&lt;P&gt;Since the variable shows months, not quarters, you can convert it with this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;quarter = input(put(quarter,6.),yymmn6.);
format quarter yymmdd10.;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Sep 2020 06:04:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Convert-quarter-to-dates/m-p/686286#M37089</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-09-24T06:04:50Z</dc:date>
    </item>
  </channel>
</rss>

