<?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: JSL: Select Rows Based On Timestamp in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626326#M82512</link>
    <description>&lt;P&gt;Do the dates look right in the data table? Is the data type for this column numeric or character? Can you show us a sample of the data? Can you show us the JSL you have tried so far?&lt;/P&gt;</description>
    <pubDate>Wed, 26 Apr 2023 14:46:04 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2023-04-26T14:46:04Z</dc:date>
    <item>
      <title>JSL: Select Rows Based On Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626308#M82510</link>
      <description>&lt;P&gt;Seems like this should be relatively basic, but in JSL or even just JMP (select where dropdown), i'm unable to select rows based on specific timestamps in my time column (H:M:S)...do i have to change this to epoch?&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 00:00:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626308#M82510</guid>
      <dc:creator>haleyhoewt</dc:creator>
      <dc:date>2023-06-11T00:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Select Rows Based On Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626326#M82512</link>
      <description>&lt;P&gt;Do the dates look right in the data table? Is the data type for this column numeric or character? Can you show us a sample of the data? Can you show us the JSL you have tried so far?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 14:46:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626326#M82512</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2023-04-26T14:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Select Rows Based On Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626330#M82513</link>
      <description>&lt;P&gt;The time variable is going to be stored as the number of seconds since midnight.&amp;nbsp; Therefore, using the syntax below will take the human readable time, and convert it to the number of seconds since midnight and then will do the comparison.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt&amp;lt;&amp;lt;select where(:time == informat("1:13:32","h:m:s"));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Apr 2023 14:53:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626330#M82513</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-04-26T14:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Select Rows Based On Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626346#M82516</link>
      <description>&lt;P&gt;Check out&amp;nbsp;&lt;LI-MESSAGE title="Using dates, times, datetimes and durations in JMP" uid="68689" url="https://community.jmp.com/t5/JMPer-Cable/Using-dates-times-datetimes-and-durations-in-JMP/m-p/68689#U68689" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You've not given us quite enough information about the situation but your final question about changing to epoch gives a clue. Yes, the right way to store dates, times, and durations is as a numeric epoch value. If the column is not numeric you can change it to numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an example where it is not numeric. Notice that the column is left justified. That's how character columns are shown.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-04-26_10-49-31.966.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/52371iEC2E17EBBAB105EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2023-04-26_10-49-31.966.png" alt="2023-04-26_10-49-31.966.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Double-click at the top of the column to get to the Column Info and change the data type to Numeric, Modeling Type to Continuous and the Format to Time-&amp;gt; h:m:s.&amp;nbsp;Check the Input Format. Make sure that matches your current values.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-04-26_11-12-51.456.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/52373i479DA386D9509C3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2023-04-26_11-12-51.456.png" alt="2023-04-26_11-12-51.456.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Click Okay and you'll have a numeric column (notice it's right justified).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-04-26_11-14-30.608.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/52374i4F2C7F7CD74946E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2023-04-26_11-14-30.608.png" alt="2023-04-26_11-14-30.608.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Apr 2023 15:15:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626346#M82516</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2023-04-26T15:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Select Rows Based On Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626355#M82518</link>
      <description>&lt;P&gt;It's easier than that. You can use a time constant.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt&amp;lt;&amp;lt;select where(:time == 01:13:32);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Apr 2023 15:19:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626355#M82518</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2023-04-26T15:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Select Rows Based On Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626944#M82559</link>
      <description>&lt;P&gt;apologies.&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is already in numeric, continuous with the format being time (h:m:s). but if you then try to select rows by condition, i get an error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 18:45:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626944#M82559</guid>
      <dc:creator>haleyhoewt</dc:creator>
      <dc:date>2023-04-27T18:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: JSL: Select Rows Based On Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626953#M82560</link>
      <description>&lt;P&gt;The issue could be that you have your Time column setup as a date time column.&amp;nbsp; A date time column measures the time in the number of seconds since 12AM January 1, 1904, while a time column has it's value stored as the number of seconds since midnight.&lt;/P&gt;
&lt;P&gt;Here is an example:&lt;/P&gt;
&lt;P&gt;I have two columns&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1682623001291.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/52438i8EB36C7267AE8DD0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1682623001291.png" alt="txnelson_0-1682623001291.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Both columns are formatted using "h"m"s".&amp;nbsp; However the first column is a date time column measured from 1904, and the time column is just a time column measured from 12AM today.&amp;nbsp; This can be seen when the format on the 2 columns is changed to display the numeric values.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1682623210517.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/52439iB09DD5E34FA1ACDE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1682623210517.png" alt="txnelson_1-1682623210517.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You need to check to see which type of column you have in order to determine how to setup the Select Where.&lt;/P&gt;
&lt;P&gt;Another way, is to change the Select Where to a different selection.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;current data table()&amp;lt;&amp;lt; Select Where(
	hour(:datetime) == 14 &amp;amp; minute(:datetime) == 3 &amp;amp; second(:datetime) == 58);
// or	
current data table()&amp;lt;&amp;lt; Select Where(
	hour(:time) == 14 &amp;amp; minute(:time) == 3 &amp;amp; second(:time) == 58);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This structure will work for both types of columns&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 19:28:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Select-Rows-Based-On-Timestamp/m-p/626953#M82560</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-04-27T19:28:00Z</dc:date>
    </item>
  </channel>
</rss>

