<?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 Date Conversion in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-Conversion/m-p/800726#M315045</link>
    <description>&lt;P&gt;I have some dates in character format:&lt;/P&gt;&lt;P&gt;UN/UNK/2020&lt;/P&gt;&lt;P&gt;14/JUN/2021&lt;/P&gt;&lt;P&gt;UN/APR/2019&lt;/P&gt;&lt;P&gt;I would need to convert them to the format yyyy-mm-dd. If day and month missing, output will be yyyy only, if day missing, output will be yyyy-mm.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Mar 2022 20:33:24 GMT</pubDate>
    <dc:creator>JillChen0131</dc:creator>
    <dc:date>2022-03-07T20:33:24Z</dc:date>
    <item>
      <title>Date Conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Conversion/m-p/800726#M315045</link>
      <description>&lt;P&gt;I have some dates in character format:&lt;/P&gt;&lt;P&gt;UN/UNK/2020&lt;/P&gt;&lt;P&gt;14/JUN/2021&lt;/P&gt;&lt;P&gt;UN/APR/2019&lt;/P&gt;&lt;P&gt;I would need to convert them to the format yyyy-mm-dd. If day and month missing, output will be yyyy only, if day missing, output will be yyyy-mm.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 20:33:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Conversion/m-p/800726#M315045</guid>
      <dc:creator>JillChen0131</dc:creator>
      <dc:date>2022-03-07T20:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Date Conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Conversion/m-p/800730#M315047</link>
      <description>&lt;P&gt;By "output" do you mean that you want an actual SAS date that displays that way?&lt;/P&gt;
&lt;P&gt;Or another character variable that can't use any of the date functions?&lt;/P&gt;
&lt;P&gt;Or a numeric value that is not in any way a date except possibly in the readers mind?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS date values must have month and day of month component. And a variable can only have one format in effect at any given time. What you request for "g, output will be yyyy only, if day missing, output will be yyyy-mm" is not possible with actual SAS dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use any of the functions such as Intck or Intnx for returning date intervals or adjusting dates, then you will have to provide a day of month and month when missing.&lt;/P&gt;
&lt;P&gt;The informats that read yyyymm type generally assume the day of the month to be 1.&lt;/P&gt;
&lt;P&gt;You would have to decide what makes sense for your purpose what date of the year just the year value would mean.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 21:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Conversion/m-p/800730#M315047</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-03-07T21:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Date Conversion</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-Conversion/m-p/800742#M315055</link>
      <description>&lt;P&gt;Question about these type of "dates" where either the day or the month (or both) has been asked and answered many times:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/convert-to-iso8601-format/m-p/613845" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/convert-to-iso8601-format/m-p/613845&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/How-to-convert-below-dates-to-as-required-format/m-p/609587" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/How-to-convert-below-dates-to-as-required-format/m-p/609587&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Re-Partial-date-conversion/m-p/575008" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/Re-Partial-date-conversion/m-p/575008&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and many other times. Lots of ideas, lots of answers.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2022 22:49:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-Conversion/m-p/800742#M315055</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-07T22:49:34Z</dc:date>
    </item>
  </channel>
</rss>

