<?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 Script to get last 6 months data in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Script-to-get-last-6-months-data/m-p/68975#M34966</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the best script to selected only the&amp;nbsp;data of the exact&amp;nbsp;&lt;STRONG&gt;last 6 months&lt;/STRONG&gt; everytime the database is updated.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Aug 2018 22:31:17 GMT</pubDate>
    <dc:creator>nicoleaba</dc:creator>
    <dc:date>2018-08-20T22:31:17Z</dc:date>
    <item>
      <title>Script to get last 6 months data</title>
      <link>https://community.jmp.com/t5/Discussions/Script-to-get-last-6-months-data/m-p/68975#M34966</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the best script to selected only the&amp;nbsp;data of the exact&amp;nbsp;&lt;STRONG&gt;last 6 months&lt;/STRONG&gt; everytime the database is updated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 22:31:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-to-get-last-6-months-data/m-p/68975#M34966</guid>
      <dc:creator>nicoleaba</dc:creator>
      <dc:date>2018-08-20T22:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Script to get last 6 months data</title>
      <link>https://community.jmp.com/t5/Discussions/Script-to-get-last-6-months-data/m-p/69001#M34979</link>
      <description>&lt;P&gt;It depends on what you mean by 'the database' and what workflow is best for the data you are handling, But, if you have data in a JMP table you can do this kind of thing:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Make some 'date' data to play with
JMPstartDate = DateDMY(01,1,2013);
JMPendDate = Today();
dt = NewTable("DateTimes", 
		NewColumn("Date", Numeric, Continuous, 
			Formula(RandomInteger(JMPstartDate, JMPendDate)), 
			Format( "ddMonyyyy h:m:s", 22, 0 )
			),
		AddRows(1000)
		);
dt &amp;lt;&amp;lt; runFormulas;
Column(dt, "Date") &amp;lt;&amp;lt; deleteFormula;
dt &amp;lt;&amp;lt; sort(By(:Date), replaceTable);

// Exclude and hide all rows older than six months ago:
// Look for 'DateIncrement()' in 'Help &amp;gt; scripting Guide'.
cutoff = Date Increment( Today(), "Month", -6, "actual" );
dt &amp;lt;&amp;lt; selectWhere(:Date &amp;lt; cutoff);
dt &amp;lt;&amp;lt; hideAndExclude;
dt &amp;lt;&amp;lt; clearSelect;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 09:25:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Script-to-get-last-6-months-data/m-p/69001#M34979</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2018-08-21T09:25:24Z</dc:date>
    </item>
  </channel>
</rss>

