<?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: converting a num var to a SAS date field in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93630#M3478</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Generally you still need SAS dates no matter what procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide more information? Is the SG Template custom designed (SG Render) or from a specific proc.&amp;nbsp; Can you modify the template?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what's your errror?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Sep 2013 20:03:06 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2013-09-25T20:03:06Z</dc:date>
    <item>
      <title>converting a num var to a SAS date field</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93629#M3477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all-&lt;/P&gt;&lt;P&gt;I have a "month" field that stores the values (5 digits) as a number vs a SAS date value. I can still&amp;nbsp; use formats as such as mmddyy10. and it works fine except when I need to use it in a SG template and then I get an error for what I need to do. Any help much appreciated. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I convert this over to an actual date value per se.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lawrence&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 19:52:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93629#M3477</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2013-09-25T19:52:34Z</dc:date>
    </item>
    <item>
      <title>Re: converting a num var to a SAS date field</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93630#M3478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Generally you still need SAS dates no matter what procedure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide more information? Is the SG Template custom designed (SG Render) or from a specific proc.&amp;nbsp; Can you modify the template?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what's your errror?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 20:03:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93630#M3478</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-09-25T20:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: converting a num var to a SAS date field</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93631#M3479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza;&lt;/P&gt;&lt;P&gt;My partial template is as follows below. The problem is that I am using the interval option=month in the xaxisopts as I want all the monthly values displayed. And this works until I stick in the x reference line and then kablu-ee-&lt;/P&gt;&lt;P&gt;The tick dates now go quarterly and the referent line no longer syncs with Aug13 but is staggered. It should be sitting right on the dateline. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see the issue in the first image.&lt;/P&gt;&lt;P&gt;The second image has all the date ticks sans referent line. &lt;/P&gt;&lt;P&gt;the message I get is: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: Time axis can only support date time values. The axis type will be changed to LINEAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So does this mean that it needs a datetime value such as 01SEP13:00:00:00?&lt;/P&gt;&lt;P&gt;All my dates are stored as datew.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lawrence &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;define statgraph BarLineMOB; /*CREATES TEMPLATE FOR HAP MOBILTY RATE GRAPHS FOR EACH FACILITY*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; begingraph;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layout overlay / xaxisopts=(timeopts=( tickvalueformat=monyy. splittickvalue=false /*viewmin='01OCT12'D viewmax='01AUG13'D */interval=month))&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yaxisopts=(LABEL=('PERCENT AMBULATED') offsetmin=0.05 offsetmax=0.05 griddisplay=on&amp;nbsp; linearopts=( viewmin=0 viewmax=.7)) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; referenceline y=.5 /lineattrs=graphdatadefault(thickness=3 color=black)&amp;nbsp; CURVElabel='Target=50%' CURVELABELPOSITION=auto Curvelabellocation=inside;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; referenceline x=19571/lineattrs=graphdatadefault(thickness=3 color=black)&amp;nbsp; CURVElabel='Change in Process Metric Calculation* ' /*CURVELABELPOSITION=auto Curvelabellocation=inside*/;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; seriesplot x=month y=PCT_COMPLIANCE / lineattrs=graphdatadefault(thickness=3 color=black) name="PERCENT AMBULATED"&amp;nbsp;&amp;nbsp;&amp;nbsp; LEGENDLABEL="PERCENT AMBULATED" ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scatterplot x=month y=PCT_COMPLIANCE / GROUP=grp_color index=index&amp;nbsp; includemissinggroup=false&amp;nbsp; markerattrs=(symbol=circlefilled size=15) name="Status"&amp;nbsp;&amp;nbsp;&amp;nbsp; LEGENDLABEL="Status";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scatterplot x=month y=PCT_COMPLIANCE /includemissinggroup=false markerattrs=(symbol=circle size=16 color=black) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; *scatterplot x=month y=PCT_COMPLIANCE / GROUP=grp_color index=index1 discreteoffset= -0.1 includemissinggroup=false markercharacter=PCT_COMPLIANCE&amp;nbsp;&amp;nbsp; markercharacterattrs=(/*color=white*/ weight=bold );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; discretelegend&amp;nbsp;&amp;nbsp; /*"HAP RATE PER 1000 ADMITS"*/ "Status" /&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; location=outside&amp;nbsp; valign=bottom;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endlayout;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endgraph;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This image happens when I add the referent line-date marks go quarterly. &lt;/P&gt;&lt;P&gt;&lt;IMG alt="Display_wrong.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/4237_Display_wrong.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All date ticks appear&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Display_dates_wo_referent.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/4238_Display_dates_wo_referent.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 21:30:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93631#M3479</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2013-09-25T21:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: converting a num var to a SAS date field</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93632#M3480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like you want a datetime variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt = dhms(date,0,0,0);&lt;/P&gt;&lt;P&gt;would create a new variable for midnight(start of day);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 22:04:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93632#M3480</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-09-25T22:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: converting a num var to a SAS date field</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93633#M3481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ballrdw;&lt;/P&gt;&lt;P&gt;Well, it didn't like that either...Although that is what I though SAS wanted as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lawrence&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 22:58:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93633#M3481</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2013-09-25T22:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: converting a num var to a SAS date field</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93634#M3482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version of SAS are you on? SG options change&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you use SG Designer to get the code or write it yourself?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide some data and I'll test it out on my side (have sas 9.3)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 23:16:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93634#M3482</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-09-25T23:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: converting a num var to a SAS date field</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93635#M3483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza;&lt;/P&gt;&lt;P&gt;OK bit by bit I am figuring this out-&lt;/P&gt;&lt;P&gt;In short the reference line must be in exactly the same format as the underlying data-&lt;/P&gt;&lt;P&gt;So if the dates are in format monyy5. in the dataset but I add a referent line as such as x= '01AUG13'D it fails to work properly-&lt;/P&gt;&lt;P&gt;So the question is how do I list the date &lt;/P&gt;&lt;P&gt;X=AUG13? in the same format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have temporarily solved the problem by using the SAS dates (eg 19571 for AUG 1 2013)&lt;/P&gt;&lt;P&gt;and then using the dynamic function to make sure I list all the dates in the sgrender statement&lt;/P&gt;&lt;P&gt;but specifying the option to using monyy5 in the xaxisopts=(linearopts=( tickvalueformat=monyy5.))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully by being able to put the date format the right way it will solve another step of creating a macro variable for the purposes of listing all the dates but a viable option if necessary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lawrence&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 18:08:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93635#M3483</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2013-09-26T18:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: converting a num var to a SAS date field</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93636#M3484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Repost this in the graphics forum, one of the SAS guys will be able to help.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure to say what version of SAS you're using.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Sep 2013 22:26:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93636#M3484</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-09-26T22:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: converting a num var to a SAS date field</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93637#M3485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reeza;&lt;/P&gt;&lt;P&gt;I just moved the whole thread over.&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lawrence&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2013 17:48:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/converting-a-num-var-to-a-SAS-date-field/m-p/93637#M3485</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2013-09-27T17:48:36Z</dc:date>
    </item>
  </channel>
</rss>

