<?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: Manipulating Timestamp in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608989#M81024</link>
    <description>&lt;P&gt;thank you very much for your help. your script is working well for me even when in UK date/time settings.&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2023 14:26:13 GMT</pubDate>
    <dc:creator>corkman1987</dc:creator>
    <dc:date>2023-03-07T14:26:13Z</dc:date>
    <item>
      <title>Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608408#M80983</link>
      <description>&lt;P&gt;Hi I am struggling to convert a Timestamp into numeric format. I basically want to use the timestamp to create an Elapsed Time column. I am having difficultly achieving this with JMP16. Below is an example of the format. The change from 12:59 to 01:00 also seems to cause issues for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="corkman1987_1-1678094435310.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50733iD02BDE681A3E53B1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="corkman1987_1-1678094435310.png" alt="corkman1987_1-1678094435310.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to work with excel and manipulate the data to give me an Elapsed time in minutes (from row 1 as starting point). But I would prefer to use JMP and to create a script for it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:31:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608408#M80983</guid>
      <dc:creator>corkman1987</dc:creator>
      <dc:date>2023-06-08T16:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608431#M80984</link>
      <description>&lt;P&gt;Here is a little script that will do the conversion.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

// The comma in the time column's data does not fit into any
// standard JMP time formats, but if removed it does
For Each Row( :time = Substitute( :time, ",", " " ) );

// Convert to numeric and format it
:time&amp;lt;&amp;lt;data type(numeric)&amp;lt;&amp;lt;modeling type(continuous)&amp;lt;&amp;lt;Format( "Locale Date Time h:m:s", 23, 0 );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Mar 2023 10:28:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608431#M80984</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-03-06T10:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608443#M80986</link>
      <description>&lt;P&gt;Thanks for quick reply and helping with the format. I ran your script and also created and elapsed time column which is basically the following formula..&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="corkman1987_1-1678099969879.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50735iB068F15A20027CD2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="corkman1987_1-1678099969879.png" alt="corkman1987_1-1678099969879.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This gives me the elapsed time in seconds. However I have this issue when the timestamp moves from 12:59pm to 1pm. It is not picking up the AM/PM information. Therefore it thinks it is 01:00AM in error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="corkman1987_0-1678099957293.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50734iFB97A3C1C550C3D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="corkman1987_0-1678099957293.png" alt="corkman1987_0-1678099957293.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 10:55:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608443#M80986</guid>
      <dc:creator>corkman1987</dc:creator>
      <dc:date>2023-03-06T10:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608452#M80987</link>
      <description>&lt;P&gt;Please attach a sample data table that has not yet been converted, and I will take a look at it.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 11:13:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608452#M80987</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-03-06T11:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608453#M80988</link>
      <description>&lt;P&gt;thanks - I am attaching an example.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 11:19:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608453#M80988</guid>
      <dc:creator>corkman1987</dc:creator>
      <dc:date>2023-03-06T11:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608457#M80990</link>
      <description>&lt;P&gt;I found no error with the data table you supplied.&amp;nbsp; It appears that your error occurred at row 3127.&amp;nbsp; The table you supplied only has 1356 rows.&amp;nbsp; I suspect that I need a sample of data that includes the error rows.&lt;/P&gt;
&lt;P&gt;Additionally,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;What OS are you using?&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;What JMP Version?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 12:00:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608457#M80990</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-03-06T12:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608474#M80993</link>
      <description>&lt;P&gt;I am still seeing the issue with the sample file i sent you. for example row 1052 onwards. I am using JMP 16 and Windows 10 OS.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="corkman1987_0-1678107349942.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50738iA9EB63A65781D0F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="corkman1987_0-1678107349942.png" alt="corkman1987_0-1678107349942.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 12:57:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608474#M80993</guid>
      <dc:creator>corkman1987</dc:creator>
      <dc:date>2023-03-06T12:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608549#M80995</link>
      <description>&lt;P&gt;I did the following in JMP 17 on MS win with the formula provided.&lt;BR /&gt;It worked on JMP16.2 on MS Win too.&lt;/P&gt;&lt;P&gt;Formulas are in the columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mlo1_0-1678112967559.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50747iA2BB0AA504D27F29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mlo1_0-1678112967559.png" alt="mlo1_0-1678112967559.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 14:30:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608549#M80995</guid>
      <dc:creator>mlo1</dc:creator>
      <dc:date>2023-03-06T14:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608552#M80996</link>
      <description>&lt;P&gt;I am not seeing the error.&amp;nbsp; See the display below.&amp;nbsp; I have also attached my data table.&amp;nbsp; The Time 2 column is the same values as the time column, but with the display format set to display the actual numeric data values behind the date/time.&amp;nbsp; It is the number of seconds since January 1, 1904.&amp;nbsp; Time 2 has the formula&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:time&amp;nbsp; &amp;nbsp;but the format is changed to Fixed Dec, 20, 3.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1678112810688.png" style="width: 608px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50746i49A4FF14D1269DD7/image-dimensions/608x703?v=v2" width="608" height="703" role="button" title="txnelson_0-1678112810688.png" alt="txnelson_0-1678112810688.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I ran the code under both JMP 16 and 17, with the same results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 14:34:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608552#M80996</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-03-06T14:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608942#M81021</link>
      <description>&lt;P&gt;Hi, thanks for sending this on to me. When i opened it all looked good. However i went into Time 2 and reapplied your formula and the results changed to what i had been seeing before. See below. The 13:00hrs data is changed to 01:00hrs.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="corkman1987_0-1678187050189.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50782iF9CF5B789DEF06A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="corkman1987_0-1678187050189.png" alt="corkman1987_0-1678187050189.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the source of the issue. My PC settings are on United Kingdom Date and Time. When I restarted JMP after changing to US date and time settings - the formula is worked correct for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The formula will not work when my PC time is set for UK.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="corkman1987_1-1678187205793.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50784i0B6EA32BD665DEAC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="corkman1987_1-1678187205793.png" alt="corkman1987_1-1678187205793.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At least I know where the issue is coming from now. But still don't have a resolution unless I keep my PC settings on US.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 11:07:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608942#M81021</guid>
      <dc:creator>corkman1987</dc:creator>
      <dc:date>2023-03-07T11:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608948#M81022</link>
      <description>&lt;P&gt;See if this works for you, if you keep your setting to UK.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

dt &amp;lt;&amp;lt; New Column( "time 2",
	Format( "m/d/y h:m:s", 23,3 ),
	set each value(
		date = Informat( Word( 1, :time, "," ) );

		hours = Num( Word( 2, :time, ",:" ) );
		If( hours == 12, hours = 0 );
		If( Word( -1, :time, " " ) == "PM",
			hours = hours + 12
		);

		:time 2 = date + In Hours( hours ) + In Minutes( Num( Word( 3, :time, ",:" ) ) )
		+Num( Word( 4, :time, ",: " ) );
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Additionally, I suggest that you submit your issue to JMP Support, so they can get it into their formal review of the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;support@jmp.com&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 13:14:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608948#M81022</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-03-07T13:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Manipulating Timestamp</title>
      <link>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608989#M81024</link>
      <description>&lt;P&gt;thank you very much for your help. your script is working well for me even when in UK date/time settings.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 14:26:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Manipulating-Timestamp/m-p/608989#M81024</guid>
      <dc:creator>corkman1987</dc:creator>
      <dc:date>2023-03-07T14:26:13Z</dc:date>
    </item>
  </channel>
</rss>

