<?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: julian dates; formats and functions in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/julian-dates-formats-and-functions/m-p/63384#M13778</link>
    <description>&amp;gt; Hello, &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I have several variables that are in mmddyy8. form in&lt;BR /&gt;
&amp;gt; a data set for which I don't care about the years but&lt;BR /&gt;
&amp;gt; rather the day of the year. I've converted them to&lt;BR /&gt;
&amp;gt; julian day format using:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; format datevariable julday8.; &lt;BR /&gt;
&lt;BR /&gt;
This doesn't change the value only the way it is displayed.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; this works, but a following if/then statement like:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; if datevariable &amp;lt; 135 then dummy = 1; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; doesn't work for some reason. &lt;BR /&gt;
&lt;BR /&gt;
Try &lt;BR /&gt;
[pre]&lt;BR /&gt;
 if input(put(datevariable,julday8),8.) lt 135 then dummy =1;&lt;BR /&gt;
[/pre]</description>
    <pubDate>Thu, 12 Aug 2010 21:04:45 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2010-08-12T21:04:45Z</dc:date>
    <item>
      <title>julian dates; formats and functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/julian-dates-formats-and-functions/m-p/63381#M13775</link>
      <description>Hello, &lt;BR /&gt;
&lt;BR /&gt;
I have several variables that are in mmddyy8. form in a data set for which I don't care about the years but rather the day of the year. I've converted them to julian day format using:&lt;BR /&gt;
&lt;BR /&gt;
format datevariable julday8.; &lt;BR /&gt;
&lt;BR /&gt;
this works, but a following if/then statement like:&lt;BR /&gt;
&lt;BR /&gt;
if datevariable &amp;lt; 135 then dummy = 1; &lt;BR /&gt;
&lt;BR /&gt;
doesn't work for some reason. &lt;BR /&gt;
&lt;BR /&gt;
Of course, the juldate function works in this situation, as in:&lt;BR /&gt;
&lt;BR /&gt;
if juldate(datevariable) &amp;lt; x then dummy = 1; &lt;BR /&gt;
&lt;BR /&gt;
but the juldate is much different than the julday. Does anybody know if there is a function for julday (day of year) rather than just for juldate? Also, can anybody see me why my if then statement doesn't work?</description>
      <pubDate>Thu, 12 Aug 2010 18:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/julian-dates-formats-and-functions/m-p/63381#M13775</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-12T18:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: julian dates; formats and functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/julian-dates-formats-and-functions/m-p/63382#M13776</link>
      <description>A partial answer for you.  This statement&lt;BR /&gt;
&lt;BR /&gt;
if datevariable &amp;lt; 135 then dummy = 1; &lt;BR /&gt;
&lt;BR /&gt;
doesn't work because the native form of a date variable is an integer with day 1 as 1/1/1960.</description>
      <pubDate>Thu, 12 Aug 2010 19:43:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/julian-dates-formats-and-functions/m-p/63382#M13776</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2010-08-12T19:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: julian dates; formats and functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/julian-dates-formats-and-functions/m-p/63383#M13777</link>
      <description>Okay, i've figured out what I was confused about. Sorry for the silly question....&lt;BR /&gt;
&lt;BR /&gt;
td</description>
      <pubDate>Thu, 12 Aug 2010 19:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/julian-dates-formats-and-functions/m-p/63383#M13777</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-12T19:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: julian dates; formats and functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/julian-dates-formats-and-functions/m-p/63384#M13778</link>
      <description>&amp;gt; Hello, &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I have several variables that are in mmddyy8. form in&lt;BR /&gt;
&amp;gt; a data set for which I don't care about the years but&lt;BR /&gt;
&amp;gt; rather the day of the year. I've converted them to&lt;BR /&gt;
&amp;gt; julian day format using:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; format datevariable julday8.; &lt;BR /&gt;
&lt;BR /&gt;
This doesn't change the value only the way it is displayed.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; this works, but a following if/then statement like:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; if datevariable &amp;lt; 135 then dummy = 1; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; doesn't work for some reason. &lt;BR /&gt;
&lt;BR /&gt;
Try &lt;BR /&gt;
[pre]&lt;BR /&gt;
 if input(put(datevariable,julday8),8.) lt 135 then dummy =1;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 12 Aug 2010 21:04:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/julian-dates-formats-and-functions/m-p/63384#M13778</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-08-12T21:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: julian dates; formats and functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/julian-dates-formats-and-functions/m-p/63385#M13779</link>
      <description>FYI you can find lots of info on SAS dates / times here:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a002200738.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/62955/HTML/default/viewer.htm#a002200738.htm&lt;/A&gt;</description>
      <pubDate>Mon, 13 Dec 2010 16:54:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/julian-dates-formats-and-functions/m-p/63385#M13779</guid>
      <dc:creator>PatrickG</dc:creator>
      <dc:date>2010-12-13T16:54:40Z</dc:date>
    </item>
  </channel>
</rss>

