<?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 Date Format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Julian-Date-Format/m-p/7700#M129</link>
    <description>SAS is assuming that the date you are trying to represent - 2007001 - is a numeric value for the number of days past 01Jan1960.  In this case 2,007,001 days.  Try using the datejul function.  This will give you your desired results.&lt;BR /&gt;
&lt;BR /&gt;
k=datejul(2007001);&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Hi,&lt;BR /&gt;
&amp;gt; I am facing problem in julian date. when i give&lt;BR /&gt;
&amp;gt; "2007001" as julian date, it gives "02JAN" for Date5.&lt;BR /&gt;
&amp;gt; format. But i need the output as "01JAN" for&lt;BR /&gt;
&amp;gt; "2007001".&lt;BR /&gt;
&amp;gt; Please help me to resolve this ASAP. I gave my code&lt;BR /&gt;
&amp;gt; and output.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Data _null_;                      &lt;BR /&gt;
&amp;gt; informat k julian7.;              &lt;BR /&gt;
&amp;gt; input julian_date julian7.;       &lt;BR /&gt;
&amp;gt; k=2007001;                        &lt;BR /&gt;
&amp;gt; put julian_date date9.;           &lt;BR /&gt;
&amp;gt; put "K=" k date9.;                &lt;BR /&gt;
&amp;gt; datalines;                        &lt;BR /&gt;
&amp;gt; 2007001                           &lt;BR /&gt;
&amp;gt; 2008001                           &lt;BR /&gt;
&amp;gt; run;                              &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;U&gt;&lt;B&gt;output:-&lt;/B&gt;&lt;/U&gt;&lt;BR /&gt;
&amp;gt; 01JAN2007        &lt;BR /&gt;
&amp;gt; K=26DEC7454      &lt;BR /&gt;
&amp;gt; 01JAN2008        &lt;BR /&gt;
&amp;gt; K=26DEC7454   &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; why its working differently for datalines and&lt;BR /&gt;
&amp;gt; assigment date value. But i need the same output for&lt;BR /&gt;
&amp;gt; assigment date value as dataline date value. Please&lt;BR /&gt;
&amp;gt; help me.   &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Thanks,&lt;BR /&gt;
&amp;gt; Selvi&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Message was edited by: Selvi</description>
    <pubDate>Wed, 26 Mar 2008 15:58:30 GMT</pubDate>
    <dc:creator>LAP</dc:creator>
    <dc:date>2008-03-26T15:58:30Z</dc:date>
    <item>
      <title>Julian Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Julian-Date-Format/m-p/7699#M128</link>
      <description>Hi,&lt;BR /&gt;
I am facing problem in julian date. when i give "2007001" as julian date, it gives "02JAN" for Date5. format. But i need the output as "01JAN" for "2007001".&lt;BR /&gt;
Please help me to resolve this ASAP. I gave my code and output.&lt;BR /&gt;
&lt;BR /&gt;
Data _null_;                      &lt;BR /&gt;
informat k julian7.;              &lt;BR /&gt;
input julian_date julian7.;       &lt;BR /&gt;
k=2007001;                        &lt;BR /&gt;
put julian_date date9.;           &lt;BR /&gt;
put "K=" k date9.;                &lt;BR /&gt;
datalines;                        &lt;BR /&gt;
2007001                           &lt;BR /&gt;
2008001                           &lt;BR /&gt;
run;                              &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;U&gt;&lt;B&gt;output:-&lt;/B&gt;&lt;/U&gt;&lt;BR /&gt;
01JAN2007        &lt;BR /&gt;
K=26DEC7454      &lt;BR /&gt;
01JAN2008        &lt;BR /&gt;
K=26DEC7454   &lt;BR /&gt;
&lt;BR /&gt;
why its working differently for datalines and assigment date value. But i need the same output for assigment date value as dataline date value. Please help me.   &lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Selvi

Message was edited by: Selvi</description>
      <pubDate>Wed, 26 Mar 2008 14:18:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Julian-Date-Format/m-p/7699#M128</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-03-26T14:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Julian Date Format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Julian-Date-Format/m-p/7700#M129</link>
      <description>SAS is assuming that the date you are trying to represent - 2007001 - is a numeric value for the number of days past 01Jan1960.  In this case 2,007,001 days.  Try using the datejul function.  This will give you your desired results.&lt;BR /&gt;
&lt;BR /&gt;
k=datejul(2007001);&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Hi,&lt;BR /&gt;
&amp;gt; I am facing problem in julian date. when i give&lt;BR /&gt;
&amp;gt; "2007001" as julian date, it gives "02JAN" for Date5.&lt;BR /&gt;
&amp;gt; format. But i need the output as "01JAN" for&lt;BR /&gt;
&amp;gt; "2007001".&lt;BR /&gt;
&amp;gt; Please help me to resolve this ASAP. I gave my code&lt;BR /&gt;
&amp;gt; and output.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Data _null_;                      &lt;BR /&gt;
&amp;gt; informat k julian7.;              &lt;BR /&gt;
&amp;gt; input julian_date julian7.;       &lt;BR /&gt;
&amp;gt; k=2007001;                        &lt;BR /&gt;
&amp;gt; put julian_date date9.;           &lt;BR /&gt;
&amp;gt; put "K=" k date9.;                &lt;BR /&gt;
&amp;gt; datalines;                        &lt;BR /&gt;
&amp;gt; 2007001                           &lt;BR /&gt;
&amp;gt; 2008001                           &lt;BR /&gt;
&amp;gt; run;                              &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;U&gt;&lt;B&gt;output:-&lt;/B&gt;&lt;/U&gt;&lt;BR /&gt;
&amp;gt; 01JAN2007        &lt;BR /&gt;
&amp;gt; K=26DEC7454      &lt;BR /&gt;
&amp;gt; 01JAN2008        &lt;BR /&gt;
&amp;gt; K=26DEC7454   &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; why its working differently for datalines and&lt;BR /&gt;
&amp;gt; assigment date value. But i need the same output for&lt;BR /&gt;
&amp;gt; assigment date value as dataline date value. Please&lt;BR /&gt;
&amp;gt; help me.   &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Thanks,&lt;BR /&gt;
&amp;gt; Selvi&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Message was edited by: Selvi</description>
      <pubDate>Wed, 26 Mar 2008 15:58:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Julian-Date-Format/m-p/7700#M129</guid>
      <dc:creator>LAP</dc:creator>
      <dc:date>2008-03-26T15:58:30Z</dc:date>
    </item>
  </channel>
</rss>

