<?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: Date format in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241400#M104</link>
    <description>&lt;P&gt;Before considering date formats you should ensure you understand how SAS values dates. Dates are the number of days since 1 January 1960, and always is a specific day. There are SAS supplied formats that display the pieces of data available such a year, month, month day and year in a variety of display formats, year and quarter, week of year, day of week and such.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your value is not a "Date". It may be possible to create a custom format that would treat a single year value such as 2011 so that it would display as "2011-2012" but if you ever run into the "half year" model year for cars introduced at a later part of the annual cycly that approach may not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How will you use that "model year" value? Will you be doing anything like arithmetic or modeling? It may be better to just use the year introduced instead of 2 years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Dec 2015 16:52:11 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-12-31T16:52:11Z</dc:date>
    <item>
      <title>Date format</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241350#M88</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ve one data set in that the format is YYYY-YYYY, where this is called as reported year.&lt;/P&gt;&lt;P&gt;when i imported to sas studio &amp;amp; after i see it is takeing as &lt;STRONG&gt;Char&amp;nbsp;&lt;/STRONG&gt;insted of takeing as &lt;STRONG&gt;date&amp;nbsp;&lt;/STRONG&gt;and also i ve used the Code to covert&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e, A= input(B,date9.) but still its not in&lt;STRONG&gt; yyyy-yyyy&lt;/STRONG&gt; format. is there any other way to make sas to understand it is date format in yyyy-yyyy. can some help me on this to understand this one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Srinidhi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2015 07:59:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241350#M88</guid>
      <dc:creator>srinidhi</dc:creator>
      <dc:date>2015-12-31T07:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241353#M89</link>
      <description>&lt;P&gt;Hi Srinidhi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not think we have a format as yyyy-yyyy, which means there are 2 years concatenated to each other. if i think so. Since it is not a date format we cannot use any date format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please provide an example of the data you have to get better solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2015 08:51:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241353#M89</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2015-12-31T08:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241354#M90</link>
      <description>Ok fine,&lt;BR /&gt;for example&lt;BR /&gt;name lunched new car year&lt;BR /&gt;BMW 2011-2012&lt;BR /&gt;Audi 2012-2013&lt;BR /&gt;&lt;BR /&gt;it will be like this.&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Dec 2015 09:23:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241354#M90</guid>
      <dc:creator>srinidhi</dc:creator>
      <dc:date>2015-12-31T09:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241359#M91</link>
      <description>Thank you for your response. As discussed i am not sure if have a format to read yyyy-yyyy. Is it not fine if you keep the variable in character itself as you could see the years.</description>
      <pubDate>Thu, 31 Dec 2015 10:13:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241359#M91</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2015-12-31T10:13:49Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241400#M104</link>
      <description>&lt;P&gt;Before considering date formats you should ensure you understand how SAS values dates. Dates are the number of days since 1 January 1960, and always is a specific day. There are SAS supplied formats that display the pieces of data available such a year, month, month day and year in a variety of display formats, year and quarter, week of year, day of week and such.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your value is not a "Date". It may be possible to create a custom format that would treat a single year value such as 2011 so that it would display as "2011-2012" but if you ever run into the "half year" model year for cars introduced at a later part of the annual cycly that approach may not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How will you use that "model year" value? Will you be doing anything like arithmetic or modeling? It may be better to just use the year introduced instead of 2 years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2015 16:52:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241400#M104</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-12-31T16:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241421#M105</link>
      <description>&lt;P&gt;YYYY-YYYY is not a date. &amp;nbsp;You might think of it as a date range (or what Teradata calls a PERIOD), but SAS does not have a special data type for storing date ranges.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are probably better off leaving it as a character variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could possible store it as two variables, say start_year and end_year. But even then they wouldn't be dates, they would be just years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2015 20:01:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241421#M105</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-12-31T20:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Date format</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241463#M106</link>
      <description>&lt;P&gt;Thanks Tom..&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jan 2016 05:19:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Date-format/m-p/241463#M106</guid>
      <dc:creator>srinidhi</dc:creator>
      <dc:date>2016-01-01T05:19:30Z</dc:date>
    </item>
  </channel>
</rss>

