<?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 Relative Julian format in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relative-Julian-format/m-p/211284#M13956</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;I have a problem with reading the date values. The source sends us the data in relative&lt;SPAN style="text-decoration: underline;"&gt; Julian format (ddd) with the date relative to the first day of the previous year&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;(1/1/2014 now).&lt;/SPAN&gt;&amp;nbsp; So when we roll into 2016, it will become 1/1/2015 to the present day.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;I created a sample code to see how I can read the below day's to be converted to a date format. For example lets assume the first value 345 is the 345th day starting from 01/01/2014 and the autopay variable should give me the value in date9 format. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;Would you know what function can I use to convert this days (ddd) into a format like date9 so that business users understand the date when they read the report. The below would how the autopay values looks like in my dataset.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;input autopay ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;datalines ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;345&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;491&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;492&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;493&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;494&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;499&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;500&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;503&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;504&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;510&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;511&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;run ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Jun 2015 15:15:00 GMT</pubDate>
    <dc:creator>anoopm7</dc:creator>
    <dc:date>2015-06-22T15:15:00Z</dc:date>
    <item>
      <title>Relative Julian format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relative-Julian-format/m-p/211284#M13956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;I have a problem with reading the date values. The source sends us the data in relative&lt;SPAN style="text-decoration: underline;"&gt; Julian format (ddd) with the date relative to the first day of the previous year&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;(1/1/2014 now).&lt;/SPAN&gt;&amp;nbsp; So when we roll into 2016, it will become 1/1/2015 to the present day.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;I created a sample code to see how I can read the below day's to be converted to a date format. For example lets assume the first value 345 is the 345th day starting from 01/01/2014 and the autopay variable should give me the value in date9 format. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;Would you know what function can I use to convert this days (ddd) into a format like date9 so that business users understand the date when they read the report. The below would how the autopay values looks like in my dataset.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;data test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;input autopay ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;datalines ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;345&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;491&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;492&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;493&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;494&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;499&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;500&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;503&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;504&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;510&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;511&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'trebuchet ms', geneva; font-size: 10pt; color: #000080;"&gt;run ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 15:15:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relative-Julian-format/m-p/211284#M13956</guid>
      <dc:creator>anoopm7</dc:creator>
      <dc:date>2015-06-22T15:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Julian format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relative-Julian-format/m-p/211285#M13957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the INTNX function to get the starting date, ie the Jan 1, 2014.&lt;/P&gt;&lt;P&gt;Then you can add the autopay to the date and format to the SAS date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;input autopay ;&lt;/P&gt;&lt;P&gt;datalines ;&lt;/P&gt;&lt;P&gt;345&lt;/P&gt;&lt;P&gt;491&lt;/P&gt;&lt;P&gt;492&lt;/P&gt;&lt;P&gt;493&lt;/P&gt;&lt;P&gt;494&lt;/P&gt;&lt;P&gt;499&lt;/P&gt;&lt;P&gt;500&lt;/P&gt;&lt;P&gt;503&lt;/P&gt;&lt;P&gt;504&lt;/P&gt;&lt;P&gt;510&lt;/P&gt;&lt;P&gt;511&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set test;&lt;/P&gt;&lt;P&gt;start_date = intnx('year', today(), -1, 'b');&lt;/P&gt;&lt;P&gt;date_want = autopay + start_date;&lt;/P&gt;&lt;P&gt;format start_date date_want date9.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 15:22:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relative-Julian-format/m-p/211285#M13957</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-06-22T15:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Julian format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relative-Julian-format/m-p/211286#M13958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree, except for the calculation of &lt;STRONG&gt;date_want&lt;/STRONG&gt;. It should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; background-color: #ffffff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;date_want = intnx("DAY", start_date, autopay - 1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;Minus one is because I assume that January first is Julian day = 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;Also, it would probably be safer to use the creation date (or last modification date) of the data file instead of &lt;STRONG&gt;Today()&lt;/STRONG&gt; to derive the starting date.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;PG&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 15:38:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relative-Julian-format/m-p/211286#M13958</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-06-22T15:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Relative Julian format</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relative-Julian-format/m-p/211287#M13959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks PG. It certainly made a difference and yielded more accurate answer as when I gave the autopay as 007 and your code gave the answer as 07JAN2014 and Reez's code was giving 08JAN2014.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jun 2015 15:50:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Relative-Julian-format/m-p/211287#M13959</guid>
      <dc:creator>anoopm7</dc:creator>
      <dc:date>2015-06-22T15:50:24Z</dc:date>
    </item>
  </channel>
</rss>

