<?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: Number into date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338177#M76934</link>
    <description>&lt;P&gt;After importing, when you click on the file on SAS, what are the properties of each of those fields? Specifically, we need to know if each is character or numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
    <pubDate>Sat, 04 Mar 2017 22:29:22 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2017-03-04T22:29:22Z</dc:date>
    <item>
      <title>Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338124#M76895</link>
      <description>&lt;P&gt;hi, i use sas 9.4&lt;/P&gt;&lt;P&gt;i got the following 2&amp;nbsp;Columns: year and day.&lt;/P&gt;&lt;P&gt;year is 2008.&lt;/P&gt;&lt;P&gt;day: 1 to 322.&lt;/P&gt;&lt;P&gt;1 means 1.1.2008 and so on...&lt;/P&gt;&lt;P&gt;how do i convert the numbers ito dates?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;super urgent!! thanxxx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 17:28:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338124#M76895</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T17:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338126#M76897</link>
      <description>&lt;P&gt;You showed what day=1 looks like. What&amp;nbsp;should day=322 look like?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 17:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338126#M76897</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-03-04T17:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338127#M76898</link>
      <description>Day 1 looks like '1' (means 1.1.2008),&lt;BR /&gt;Day 322 looks like '322'...</description>
      <pubDate>Sat, 04 Mar 2017 18:08:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338127#M76898</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T18:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338128#M76899</link>
      <description>&lt;P&gt;Ok. Day 322 looks like '322', but means? ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does it mean the 322nd day of the year? Plus you said that it looks like '322'. Is that the number 322, or a character string?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 18:13:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338128#M76899</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-03-04T18:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338129#M76900</link>
      <description>Number- 322</description>
      <pubDate>Sat, 04 Mar 2017 18:16:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338129#M76900</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T18:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338130#M76901</link>
      <description>&lt;P&gt;Assuming day is the sequential day in a year, you can calculatr the date as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;date = mdy(1,1,year) + day -1;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;format day ddmmyy10. ; &amp;nbsp; /* or any other date format, e.g date9. */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;taht is, for year=2008 then date = Jan 1st, 2008 + day - 1;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 18:16:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338130#M76901</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-04T18:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338131#M76902</link>
      <description>Ok,i will try&lt;BR /&gt;Thanxxx</description>
      <pubDate>Sat, 04 Mar 2017 18:22:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338131#M76902</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T18:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338132#M76903</link>
      <description>&lt;P&gt;If you have the year and the day input as yyyyddd&lt;/P&gt;
&lt;P&gt;then you can also use:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _NULL_;
    date_in = '2016055';    /*year=2016 day=055 */
    date = input(date_in, julian7.);  /* Julian date informat */
     put date date9.;       /* check date in log */
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 04 Mar 2017 18:29:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338132#M76903</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-04T18:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338134#M76905</link>
      <description>What will be the syntax if i have 300+ rows?</description>
      <pubDate>Sat, 04 Mar 2017 18:53:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338134#M76905</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T18:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338135#M76906</link>
      <description>&lt;P&gt;Tha synatx depends on your input.&lt;/P&gt;
&lt;P&gt;Post a sample of your input file, better as data step to read it,&lt;/P&gt;
&lt;P&gt;or maybe:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
    input date julian7. ;
    format date date9.;
datalines;
2008200
2010035
2015106
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 04 Mar 2017 19:12:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338135#M76906</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-03-04T19:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338136#M76907</link>
      <description>&lt;P&gt;Do you have the data already in a dataset? Or are you reading from a text file? &amp;nbsp;If you are reading from a text file then the data step would look like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
   infile 'myfile.txt' ;
   input year day ;
   date = mdy(1,1,year)+day-1;
   format date date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you have an existing SAS dataset then replace the INFILE and INPUT statements with a SET statement.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 19:13:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338136#M76907</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-03-04T19:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338169#M76930</link>
      <description>&lt;P&gt;i have data in an exel file.&lt;/P&gt;&lt;P&gt;how will the syntax will be?&lt;/P&gt;&lt;P&gt;this way it is not working...&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 21:44:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338169#M76930</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T21:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338173#M76931</link>
      <description>&lt;P&gt;i have +300 rows... in colum 'day' i have number: 1-365, in colum 'year'= 2008.&lt;/P&gt;&lt;P&gt;i want to create anothe colum name 'date'- which will be the xx (from colum 'day') day of the year 2008.&lt;/P&gt;&lt;P&gt;for exemple: if i have the number 4 in 'day' colum, i want that it colum 'date' it will show: 4/1/2008.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 22:21:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338173#M76931</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T22:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338177#M76934</link>
      <description>&lt;P&gt;After importing, when you click on the file on SAS, what are the properties of each of those fields? Specifically, we need to know if each is character or numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 22:29:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338177#M76934</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-03-04T22:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338178#M76935</link>
      <description>&lt;P&gt;is this helps?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;informat year best32. ;&lt;BR /&gt;informat day best32.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 22:30:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338178#M76935</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T22:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338179#M76936</link>
      <description>&lt;P&gt;format: BEST12.&lt;/P&gt;&lt;P&gt;informat:&amp;nbsp;BEST32.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for both...&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 22:32:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338179#M76936</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T22:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338180#M76937</link>
      <description>&lt;P&gt;both numeric&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 22:33:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338180#M76937</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T22:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338181#M76938</link>
      <description>&lt;P&gt;Have you tried the code like&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt;&amp;nbsp;proposed, namely:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data want;
  set have; /*replace 'have' with whatever the filename is*/
  date = mdy(1,1,year) + day -1; 
  format date date9.;
run;

&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 22:37:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338181#M76938</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-03-04T22:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338182#M76939</link>
      <description>&lt;P&gt;ok, i did...&lt;/P&gt;&lt;P&gt;now i receive colum name 'date' with numbers.&lt;/P&gt;&lt;P&gt;exemple: for day=1 in colum 'date'=&amp;nbsp;17532.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can i convert this to dd/mm/yy format?&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 22:39:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338182#M76939</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T22:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Number into date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338184#M76940</link>
      <description>&lt;P&gt;ok, i was a little foolish with my previous question.&lt;/P&gt;&lt;P&gt;i search some more, and put the following syntax:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want5;&amp;nbsp;&lt;BR /&gt;set model; /*original data base*/&lt;BR /&gt;date = mdy(1,1,year) + day -1;&lt;BR /&gt;format date ddmmyy10.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;working excelent!!!&lt;/P&gt;&lt;P&gt;thank you very very very much!&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2017 22:59:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Number-into-date/m-p/338184#M76940</guid>
      <dc:creator>rochka84</dc:creator>
      <dc:date>2017-03-04T22:59:58Z</dc:date>
    </item>
  </channel>
</rss>

