<?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: Create Year Column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-Year-Column/m-p/236214#M43266</link>
    <description>Is project_start a datetime? If so, use the datepart function to take the date part first.&lt;BR /&gt;&lt;BR /&gt;year=year(datepart(project_start));</description>
    <pubDate>Tue, 24 Nov 2015 15:59:17 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-11-24T15:59:17Z</dc:date>
    <item>
      <title>Create Year Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Year-Column/m-p/236212#M43264</link>
      <description>&lt;P&gt;I am trying to save the numeric year as a column based off of a data column.&lt;/P&gt;&lt;P&gt;In a datastep I have&lt;/P&gt;&lt;P&gt;Year = year(Project_Start);&lt;/P&gt;&lt;P&gt;Oddly the year returns blank.&amp;nbsp; In the log there is this line:&lt;/P&gt;&lt;P&gt;NOTE: Invalid argument to function YEAR(1772409600) at line 80 column 9.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2015 15:54:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Year-Column/m-p/236212#M43264</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2015-11-24T15:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create Year Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Year-Column/m-p/236214#M43266</link>
      <description>Is project_start a datetime? If so, use the datepart function to take the date part first.&lt;BR /&gt;&lt;BR /&gt;year=year(datepart(project_start));</description>
      <pubDate>Tue, 24 Nov 2015 15:59:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Year-Column/m-p/236214#M43266</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-24T15:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create Year Column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-Year-Column/m-p/236217#M43267</link>
      <description>&lt;P&gt;Most likely you are dealing with a date-time value instead of date. Try this:&lt;/P&gt;&lt;P&gt;Year = year(datepart(Project_Start));&lt;/P&gt;&lt;P&gt;Or this:&lt;/P&gt;&lt;P&gt;Year=input(put(Project_Start,dtyear4.),4.);&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2015 16:11:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-Year-Column/m-p/236217#M43267</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-11-24T16:11:48Z</dc:date>
    </item>
  </channel>
</rss>

