<?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: graphs for trading hours on several days in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468490#M16137</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/98381"&gt;@somebody&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So I tried your suggestion and almost get there. my code is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data datetimefmt; 
set trade_summary2; 
keep fmtname n datetime;
rename n=start datetime=label;
fmtname="datetimefmt";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, the display value is a long number, not in a datetime format that i need (i.e. 10Apr2018 09:30:15). What am I missing?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Most likely you want to use something like Label = put(datetime, datetime12.); to show values to hours.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jun 2018 19:07:15 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-06-07T19:07:15Z</dc:date>
    <item>
      <title>graphs for trading hours on several days</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468174#M16106</link>
      <description>&lt;P&gt;I would like to draw a graph that shows intraday price changes in several days. Each day trading hour is from 9am to 4pm. I have a date variable and a time variable. If I use these variables&amp;nbsp;then there would be gaps between the days as there is no data between 4pm and 9 am the next day. One quick way I could overcome this is to use the order number _N_ but then I need to format the time axis to show the date and hour correctly. Is there a different and proper way to do this? thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 19:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468174#M16106</guid>
      <dc:creator>somebody</dc:creator>
      <dc:date>2018-06-06T19:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: graphs for trading hours on several days</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468175#M16107</link>
      <description>&lt;P&gt;I addressed the "gap" issue in this blog article for holidays.&amp;nbsp; You can likely use the idea for your case.&amp;nbsp; I do not know of any format you can user to do this automatically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2017/09/27/stock-chart/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2017/09/27/stock-chart/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If a single axis is not a requirement, another way would be to use SGPANEL with PANELBY=day, and put the cells in a row.&amp;nbsp; Then, all the gaps between 4pm and 9am should go away.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 20:03:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468175#M16107</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-06-06T20:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: graphs for trading hours on several days</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468185#M16111</link>
      <description>&lt;P&gt;I'm not sure if it would be worth the work depending on how many days you display at a time but the RANGES option could be used to create breaks. Use the date and time to create a datetime variable, use the desired format such as datetime10.&amp;nbsp;and specify the ranges for each day which could be built from your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The break indicators might not be wanted but would at least indicate nothing is supposed to be in those intervals.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 20:19:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468185#M16111</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-06T20:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: graphs for trading hours on several days</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468186#M16112</link>
      <description>&lt;P&gt;I'd probably use the _n_ method and build a user defined format to show the dates the way you want. You can use CNTLIN to create the table that maps the _n_ to the date.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 20:32:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468186#M16112</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-06-06T20:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: graphs for trading hours on several days</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468425#M16131</link>
      <description>&lt;P&gt;So I tried your suggested method but it gives an empty graph. my code is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=trade_summary2 noborder;

title "Intraday Effective Spread";
series x=datetime y=ES;

xaxis label= "Date" type=discrete discreteorder=data;
run;

I also changed type option to Time (type=TIME) but the gaps remain. &lt;BR /&gt;datetime is a datetime variable&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jun 2018 15:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468425#M16131</guid>
      <dc:creator>somebody</dc:creator>
      <dc:date>2018-06-07T15:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: graphs for trading hours on several days</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468444#M16132</link>
      <description>&lt;P&gt;So I tried your suggestion and almost get there. my code is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data datetimefmt; 
set trade_summary2; 
keep fmtname n datetime;
rename n=start datetime=label;
fmtname="datetimefmt";
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, the display value is a long number, not in a datetime format that i need (i.e. 10Apr2018 09:30:15). What am I missing?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 16:25:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468444#M16132</guid>
      <dc:creator>somebody</dc:creator>
      <dc:date>2018-06-07T16:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: graphs for trading hours on several days</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468490#M16137</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/98381"&gt;@somebody&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So I tried your suggestion and almost get there. my code is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data datetimefmt; 
set trade_summary2; 
keep fmtname n datetime;
rename n=start datetime=label;
fmtname="datetimefmt";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, the display value is a long number, not in a datetime format that i need (i.e. 10Apr2018 09:30:15). What am I missing?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Most likely you want to use something like Label = put(datetime, datetime12.); to show values to hours.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 19:07:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/graphs-for-trading-hours-on-several-days/m-p/468490#M16137</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-07T19:07:15Z</dc:date>
    </item>
  </channel>
</rss>

