<?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 Extract Part of the String in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Extract-Part-of-the-String/m-p/708524#M89255</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a string and I want to extract everything but the last four characters of the string.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the following string,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;12/9/2023 19:05:57:754&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would results in,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;12/9/2023 19:05:57&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I do this in JMP&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 20:29:31 GMT</pubDate>
    <dc:creator>JMP_9006</dc:creator>
    <dc:date>2023-12-12T20:29:31Z</dc:date>
    <item>
      <title>Extract Part of the String</title>
      <link>https://community.jmp.com/t5/Discussions/Extract-Part-of-the-String/m-p/708524#M89255</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a string and I want to extract everything but the last four characters of the string.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the following string,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;12/9/2023 19:05:57:754&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;would results in,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;12/9/2023 19:05:57&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I do this in JMP&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 20:29:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extract-Part-of-the-String/m-p/708524#M89255</guid>
      <dc:creator>JMP_9006</dc:creator>
      <dc:date>2023-12-12T20:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Part of the String</title>
      <link>https://community.jmp.com/t5/Discussions/Extract-Part-of-the-String/m-p/708560#M89256</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;myString="12/9/2023 19:05:57:754";
length=Length(myString);
Substr("12/9/2023 19:05:57:754", 1,length-4)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Dec 2023 20:32:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extract-Part-of-the-String/m-p/708560#M89256</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-12-12T20:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Part of the String</title>
      <link>https://community.jmp.com/t5/Discussions/Extract-Part-of-the-String/m-p/708561#M89257</link>
      <description>&lt;P&gt;Thank you. It works!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 20:49:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extract-Part-of-the-String/m-p/708561#M89257</guid>
      <dc:creator>JMP_9006</dc:creator>
      <dc:date>2023-12-12T20:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Extract Part of the String</title>
      <link>https://community.jmp.com/t5/Discussions/Extract-Part-of-the-String/m-p/708667#M89268</link>
      <description>&lt;P&gt;Other simple option is to use &lt;A href="https://www.jmp.com/support/help/en/17.2/#page/jmp/character-functions-2.shtml?os=win&amp;amp;source=application#ww2479282" target="_self"&gt;Left()&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

str = "12/9/2023 19:05:57:754";
res = Left(str, Length(str) - 4);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and if you really want to get the date and time without milliseconds (not string without last 4 characters) you can also use Word&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

str = "12/9/2023 19:05:57:754";
res = Word([1 -2], str, ":");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or left with contains to get last ":"&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

str = "12/9/2023 19:05:57:754";
res2 = Left(str, Contains(str, ":", -1) - 1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Dec 2023 07:23:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Extract-Part-of-the-String/m-p/708667#M89268</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-13T07:23:27Z</dc:date>
    </item>
  </channel>
</rss>

