<?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: text DATE-TIME convertion to date-time format in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/712351#M89567</link>
    <description>&lt;P&gt;This might also work (but for whatever reason it didn't work every time I tried it)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

str = "03/06/2015 1659";

Informat(str, "Format Pattern", "&amp;lt;MM&amp;gt;&amp;lt;/&amp;gt;&amp;lt;DD&amp;gt;&amp;lt;/&amp;gt;&amp;lt;YYYY&amp;gt; &amp;lt;hh24&amp;gt;&amp;lt;mm&amp;gt;");&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 23 Dec 2023 19:24:05 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2023-12-23T19:24:05Z</dc:date>
    <item>
      <title>text DATE-TIME convertion to date-time format</title>
      <link>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/710844#M89452</link>
      <description>&lt;P&gt;Using JMP 10.0.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a txt string that looks like this in a TXT field.&amp;nbsp; &amp;nbsp; need it as&amp;nbsp; mm/dd/yyyy hr mm as a date-time number.&lt;/P&gt;&lt;P class=""&gt;03/06/2015 1659&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;I am several frustrating hours into what is likely simple .. and can't do it in JMP or Excel ... so, will parse and reassemble the txt and move forward, but really, this should not be this hard.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Would appreciate your help.&amp;nbsp; Tried "custom formats" in JMP and got nothing ..&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Thanks in advance.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 23:43:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/710844#M89452</guid>
      <dc:creator>tcoates</dc:creator>
      <dc:date>2023-12-19T23:43:15Z</dc:date>
    </item>
    <item>
      <title>Re: text DATE-TIME convertion to date-time format</title>
      <link>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/710853#M89453</link>
      <description>&lt;P&gt;Correction ... am using JMP 17.0.0 ..&amp;nbsp; dont know why that changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tom&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 23:45:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/710853#M89453</guid>
      <dc:creator>tcoates</dc:creator>
      <dc:date>2023-12-19T23:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: text DATE-TIME convertion to date-time format</title>
      <link>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/710954#M89462</link>
      <description>&lt;P&gt;Here is my way of handling this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

text = "03/06/2015 1659";
// JMP will not recognize the hour and minutes without
// a colon(:) between them, so simply add it in
text = left(text,13) || ":" || right(text,2);

// Now the informat() function can read in the 
// text field and convert it into a JMP Date/Time
informat(text, "m/d/y h:m");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 20 Dec 2023 03:59:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/710954#M89462</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-12-20T03:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: text DATE-TIME convertion to date-time format</title>
      <link>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/711014#M89468</link>
      <description>&lt;P&gt;I would most likely also go with some sort of text parsing without using format pattern BUT if you want to use format pattern you can, but I'm not sure if I would trust this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

str = "03/06/2015 1659";

Informat(str, "Format Pattern", "&amp;lt;MM&amp;gt;&amp;lt;/&amp;gt;&amp;lt;DD&amp;gt;&amp;lt;/&amp;gt;&amp;lt;YYYY&amp;gt; &amp;lt;hh24&amp;gt;&amp;lt;mm&amp;gt;");
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and I would most likely add the separator to time before using this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

str = "03/06/2015 1659";

Informat(Insert(str, ":", 14), "Format Pattern", "&amp;lt;MM&amp;gt;&amp;lt;/&amp;gt;&amp;lt;DD&amp;gt;&amp;lt;/&amp;gt;&amp;lt;YYYY&amp;gt; &amp;lt;hh24&amp;gt;&amp;lt;::&amp;gt;&amp;lt;mm&amp;gt;");
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And to add this to data table, create new formula column with Numeric data type, use the Informat part as your formula and apply it. Then you can remove the formula and modify formatting as needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 07:45:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/711014#M89468</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-20T07:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: text DATE-TIME convertion to date-time format</title>
      <link>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/712348#M89564</link>
      <description>&lt;P&gt;Thanks for the reply ..&amp;nbsp; &amp;nbsp; &amp;nbsp;i was afraid of this ..&amp;nbsp; &amp;nbsp;I think i will just adjust the output the primary data source if i can to include the ":" in the correct place.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tom&lt;/P&gt;</description>
      <pubDate>Sat, 23 Dec 2023 19:00:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/712348#M89564</guid>
      <dc:creator>tcoates</dc:creator>
      <dc:date>2023-12-23T19:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: text DATE-TIME convertion to date-time format</title>
      <link>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/712349#M89565</link>
      <description>&lt;P&gt;Thanks for the reply ..&amp;nbsp; &amp;nbsp; &amp;nbsp;i was afraid of this ..&amp;nbsp; &amp;nbsp;I think i will just adjust the output the primary data source if i can to include the ":" in the correct place.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks to JTHI as well who suggested the same.&amp;nbsp; &amp;nbsp;I had tried some versions of your suggestions .. but probably got the syntax wrong.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;tom&lt;/P&gt;</description>
      <pubDate>Sat, 23 Dec 2023 19:04:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/712349#M89565</guid>
      <dc:creator>tcoates</dc:creator>
      <dc:date>2023-12-23T19:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: text DATE-TIME convertion to date-time format</title>
      <link>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/712351#M89567</link>
      <description>&lt;P&gt;This might also work (but for whatever reason it didn't work every time I tried it)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

str = "03/06/2015 1659";

Informat(str, "Format Pattern", "&amp;lt;MM&amp;gt;&amp;lt;/&amp;gt;&amp;lt;DD&amp;gt;&amp;lt;/&amp;gt;&amp;lt;YYYY&amp;gt; &amp;lt;hh24&amp;gt;&amp;lt;mm&amp;gt;");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 23 Dec 2023 19:24:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/text-DATE-TIME-convertion-to-date-time-format/m-p/712351#M89567</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-12-23T19:24:05Z</dc:date>
    </item>
  </channel>
</rss>

