<?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: Convert AM/PM time text to 24h time format - no JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186650#M40512</link>
    <description>Thank you, it is ok with formula.&lt;BR /&gt;Probably there is no way without formula...</description>
    <pubDate>Wed, 13 Mar 2019 13:19:35 GMT</pubDate>
    <dc:creator>tom_abramov</dc:creator>
    <dc:date>2019-03-13T13:19:35Z</dc:date>
    <item>
      <title>Convert AM/PM time text to 24h time format - no JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186160#M40465</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm having trouble converting values like&amp;nbsp;&lt;/P&gt;&lt;P&gt;08:49:46 PM&lt;BR /&gt;10:30:46 AM&lt;/P&gt;&lt;P&gt;from Character Column to Numeric h:m:s 24h format.&lt;/P&gt;&lt;P&gt;I would like to run the conversion without&amp;nbsp;JSL and without depending on Operation system time format.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please assist.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tom.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 07:22:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186160#M40465</guid>
      <dc:creator>tom_abramov</dc:creator>
      <dc:date>2019-03-12T07:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AM/PM time text to 24h time format - no JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186249#M40469</link>
      <description>&lt;P&gt;If your column is character, then you can do this with point an click. Right click on the column and do all these steps befor pressing OK&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Select Data Type &amp;gt; Numeric,&lt;/LI&gt;
&lt;LI&gt;Modeling Type &amp;gt; Continuous,&lt;/LI&gt;
&lt;LI&gt;Format &amp;gt; Duration &amp;gt; hr:m:s&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;If you wnat to not risk the current column, create a new column that is numeric and continuous, and use the formula Informat( char_column, "hr:m:s"). Then change the format to Duration.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 10:06:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186249#M40469</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-03-12T10:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AM/PM time text to 24h time format - no JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186446#M40475</link>
      <description>&lt;P&gt;Thank you, but unfortunately, I get missing values after the changes you mentioned...&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 15:38:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186446#M40475</guid>
      <dc:creator>tom_abramov</dc:creator>
      <dc:date>2019-03-12T15:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AM/PM time text to 24h time format - no JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186511#M40486</link>
      <description>&lt;P&gt;Which version of JMP are you using? There was one version where conversion in place did not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you make a new column, and use the&amp;nbsp; function Informat( Trim(your_char_column), "h:m:s"). This should return numbers then change that column's format to Duration &amp;gt; hr:m:s. The &lt;STRONG&gt;Trim()&lt;/STRONG&gt; function will remove spaces and other unprintable characters. I hope that works.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 554px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16270iD5D03F76B3DE0AE8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2019 20:23:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186511#M40486</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-03-12T20:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AM/PM time text to 24h time format - no JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186585#M40504</link>
      <description>&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;I am using JMP 14 Pro.&lt;/P&gt;&lt;P&gt;Still getting missing values - see attached screenshot.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 07:06:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186585#M40504</guid>
      <dc:creator>tom_abramov</dc:creator>
      <dc:date>2019-03-13T07:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AM/PM time text to 24h time format - no JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186633#M40508</link>
      <description>&lt;P&gt;What is the data type of Column 1? I can see the modeling type is nominal. If Column 1 is Numeric and&amp;nbsp; Nominal, Informat returns an empty().&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the column is already numeric, just change the Format&amp;nbsp; of Column 1 to Duration.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 09:44:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186633#M40508</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-03-13T09:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AM/PM time text to 24h time format - no JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186634#M40509</link>
      <description>&lt;P&gt;It's probably the "PM" that causes it to fail. &lt;EM&gt;Informat()&lt;/EM&gt; should work if using just the time part of the string, e.g. by using the &lt;EM&gt;Left()&lt;/EM&gt; function and conditionally correct for the AM/PM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this formula:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Informat(Left(:Column 1, 8), "h:m:s") + If(Contains(:Column 1, "AM"), 0, In Hours(12))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 09:53:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186634#M40509</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2019-03-13T09:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AM/PM time text to 24h time format - no JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186650#M40512</link>
      <description>Thank you, it is ok with formula.&lt;BR /&gt;Probably there is no way without formula...</description>
      <pubDate>Wed, 13 Mar 2019 13:19:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186650#M40512</guid>
      <dc:creator>tom_abramov</dc:creator>
      <dc:date>2019-03-13T13:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AM/PM time text to 24h time format - no JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186808#M40528</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2996"&gt;@tom_abramov&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have a solution from&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/182"&gt;@ms&lt;/a&gt;&amp;nbsp;response.&amp;nbsp; However, we either have very different JMP versions or we were not communicating very well, so this is an FYI response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your screenshot showed nominal modeling but only displayed time, 08:49:46 PM.&amp;nbsp; If this column was numeric, not character then &lt;STRONG&gt;Informat()&lt;/STRONG&gt; will return an empty because it's argument needs to be a string/character.&amp;nbsp; So, it is important to specify whether your data is numeric or character, and or attach a sample data table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your incoming column is a DateTime column just formatted as time and it is numeric, I suggest you create a new column using the function/formula &lt;STRONG&gt;Time of Day(column 1)&lt;/STRONG&gt; then format that new column as Duration.&amp;nbsp; Even when a column is formatted as just time, if I wanted to find the time between say row 1 and row 2 and of the DateTime column just formatted as time it would include teh number of days, the underlying data is still datetime.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the Main Menu, select Help &amp;gt; Scripting Index &amp;gt; Functions &amp;gt; Date Time there are example scripts you can run to see how each function works, whether its argument is string or numeric.&amp;nbsp; This is an easy way to learn more. FYI&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 20:18:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/186808#M40528</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2019-03-13T20:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Convert AM/PM time text to 24h time format - no JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/521908#M74697</link>
      <description>&lt;P&gt;That formula fails for certain conditions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Time_1:&amp;nbsp; &amp;nbsp;6/16/2022 11:20:49 AM&lt;BR /&gt;Time_2:&amp;nbsp; &amp;nbsp;6/16/2022 12:45:13 PM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If we consider Time_1 we will gain --&amp;gt;&amp;nbsp;6/16/2022 11:20:49&lt;/P&gt;&lt;P&gt;However, if we consider Time_2 we will gain --&amp;gt;&amp;nbsp;7/16/2022 00:45:13 (switching to the wrong day).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an easy way to convert a timestamp like Time_1 or Time_2 into a continous numeric instead of a string?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards Sven&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jul 2022 15:20:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Convert-AM-PM-time-text-to-24h-time-format-no-JSL/m-p/521908#M74697</guid>
      <dc:creator>Kiwi</dc:creator>
      <dc:date>2022-07-15T15:20:04Z</dc:date>
    </item>
  </channel>
</rss>

