<?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: Deleting data that is not within the required date range in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Deleting-data-that-is-not-within-the-required-date-range/m-p/63462#M34007</link>
    <description>&lt;P&gt;1.&amp;nbsp; What does the text file structure look like?&lt;/P&gt;
&lt;P&gt;2. Are the data to be analyzed already in a JMP data table?&lt;/P&gt;
&lt;P&gt;3. Is there a valid JMP date column in the data to be analyzed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, what you would do, is to read in he dates from the text file.&amp;nbsp; Then find all of the rows in the analysis table that meet that requirement, and then subset those rows into a new data table.&amp;nbsp; Finally, you would run your analysis on the subsetted data table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you could provide more details about the structure of the text file and the data file/table, I could possibly find a solution for you.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Jul 2018 21:35:05 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-07-19T21:35:05Z</dc:date>
    <item>
      <title>Deleting data that is not within the required date range</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-data-that-is-not-within-the-required-date-range/m-p/63456#M34005</link>
      <description>&lt;P&gt;I have two dates saved in a text file in the format mm/dd/yyyy. I need to analyse data that falls in this date range and delete all other data.&lt;/P&gt;&lt;P&gt;How can I do this?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 21:19:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-data-that-is-not-within-the-required-date-range/m-p/63456#M34005</guid>
      <dc:creator>ENTHU</dc:creator>
      <dc:date>2018-07-19T21:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting data that is not within the required date range</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-data-that-is-not-within-the-required-date-range/m-p/63462#M34007</link>
      <description>&lt;P&gt;1.&amp;nbsp; What does the text file structure look like?&lt;/P&gt;
&lt;P&gt;2. Are the data to be analyzed already in a JMP data table?&lt;/P&gt;
&lt;P&gt;3. Is there a valid JMP date column in the data to be analyzed?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically, what you would do, is to read in he dates from the text file.&amp;nbsp; Then find all of the rows in the analysis table that meet that requirement, and then subset those rows into a new data table.&amp;nbsp; Finally, you would run your analysis on the subsetted data table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you could provide more details about the structure of the text file and the data file/table, I could possibly find a solution for you.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2018 21:35:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-data-that-is-not-within-the-required-date-range/m-p/63462#M34007</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-07-19T21:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting data that is not within the required date range</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-data-that-is-not-within-the-required-date-range/m-p/63536#M34033</link>
      <description>&lt;P&gt;Thanks for the response.Attaching sample text file.I have all the data in jmp table that also contains a valid JMP date column.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 16:46:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-data-that-is-not-within-the-required-date-range/m-p/63536#M34033</guid>
      <dc:creator>ENTHU</dc:creator>
      <dc:date>2018-07-20T16:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting data that is not within the required date range</title>
      <link>https://community.jmp.com/t5/Discussions/Deleting-data-that-is-not-within-the-required-date-range/m-p/63542#M34035</link>
      <description>&lt;P&gt;Here are 2 examples of how you can run an analysis based upon dates read in from a text file&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Create a sample data table
dt = New Table( "Example",
	Add Rows( 7 ),
	New Column( "ACTUAL_SHORT_DATE",
		Numeric,
		"Continuous",
		Format( "m/d/y", 12 ),
		Input Format( "m/d/y" ),
		Set Values(
			[3612470400, 3614025600, 3618777600, 3614457600, 3613420800,
			3578947200, 3613939200]
		),
		Set Display Width( 154 )
	),
	New Column( "Sample Data",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[0.865467654397147, 0.551025322305757, -0.780534757628151,
			0.590164622893679, -0.084595197133406, 0.93192690045854,
			-0.652714499840696]
		)
	)
);

// Read the data from the text file
textValue = Load Text File( "C:\Temp\DateRange.txt" );

// Parse out the start and end dates
startDate = Informat( Word( 1, textValue, " " ) );
endDate = Informat( Word( 2, textValue, " " ) );

// Select the data that falls within the start
// and end dates
dt &amp;lt;&amp;lt; select where(
	:ACTUAL_SHORT_DATE &amp;gt; startDate &amp;amp; :ACTUAL_SHORT_DATE &amp;lt; endDate
);

// Subset
dtSub = dt &amp;lt;&amp;lt; Subset(
	Selected Rows( 0 ),
	Rows( [2, 4, 5, 7] ),
	Selected columns only( 0 )
);
	
// Analyze the data
dtSub &amp;lt;&amp;lt; Bivariate( Y( :Sample Data ), X( :ACTUAL_SHORT_DATE ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Create a sample data table
dt = New Table( "Example",
	Add Rows( 7 ),
	New Column( "ACTUAL_SHORT_DATE",
		Numeric,
		"Continuous",
		Format( "m/d/y", 12 ),
		Input Format( "m/d/y" ),
		Set Values(
			[3612470400, 3614025600, 3618777600, 3614457600, 3613420800,
			3578947200, 3613939200]
		),
		Set Display Width( 154 )
	),
	New Column( "Sample Data",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Set Values(
			[0.865467654397147, 0.551025322305757, -0.780534757628151,
			0.590164622893679, -0.084595197133406, 0.93192690045854,
			-0.652714499840696]
		)
	)
);

// Read the data from the text file
textValue = Load Text File( "C:\Temp\DateRange.txt" );

// Parse out the start and end dates
startDate = Informat( Word( 1, textValue, " " ) );
endDate = Informat( Word( 2, textValue, " " ) );

// Select the data that falls outside the start
// and end dates
dt &amp;lt;&amp;lt; select where(
	:ACTUAL_SHORT_DATE &amp;lt; startDate | :ACTUAL_SHORT_DATE &amp;gt; endDate
);

// Hide and exclude the selected rows
dt &amp;lt;&amp;lt; Hide and Exclude;

dt &amp;lt;&amp;lt; clear select;
	
// Analyze the data
dt &amp;lt;&amp;lt; Bivariate( Y( :Sample Data ), X( :ACTUAL_SHORT_DATE ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jul 2018 17:54:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Deleting-data-that-is-not-within-the-required-date-range/m-p/63542#M34035</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-07-20T17:54:22Z</dc:date>
    </item>
  </channel>
</rss>

