<?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: Best way to convert UTC time format to numeric in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Best-way-to-convert-UTC-time-format-to-numeric/m-p/842345#M101616</link>
    <description>&lt;P&gt;Thanks, saved the day, had the same issue and because I put the Z between a set of &amp;lt; &amp;gt; it didn't work.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2025 12:01:51 GMT</pubDate>
    <dc:creator>Binyamin</dc:creator>
    <dc:date>2025-02-18T12:01:51Z</dc:date>
    <item>
      <title>Best way to convert UTC time format to numeric</title>
      <link>https://community.jmp.com/t5/Discussions/Best-way-to-convert-UTC-time-format-to-numeric/m-p/611789#M81207</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;(JMP 17 &amp;amp; JMP 18EA)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I have some XML data with a column that contains a time stamp, but the data format is not very compatible for what I'd like to do with it in JMP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The data is in the following UTC format yyyy-mm-ddThh:mm:ss.SSSZ, where the usual meanings are applied to the abbreviations. Here, there is actually a "T" after dd, and a Z after ".SSS", and the .SSS stands for milliseconds, there are no spaces. Unfortunately, JMP doesn't appear to have a built-in date format that can handle this well, even though it does have a similar format, but without the milliseconds and Z; so JMP can handle time in the format yyyy-mm-ddThh:mm:ss.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The only way I can get JMP to parse the UTC date/time is by using the Substr() command in a column formula, remove the column formula, and then change the data type and format. This won't be too difficult to script, but just wondering if someone else has a more efficient way of handling date/time data in this unusual format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Or, does anyone know if JMP is considering to include this UTC time format to make conversion easier?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:29:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Best-way-to-convert-UTC-time-format-to-numeric/m-p/611789#M81207</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2023-06-08T16:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to convert UTC time format to numeric</title>
      <link>https://community.jmp.com/t5/Discussions/Best-way-to-convert-UTC-time-format-to-numeric/m-p/611811#M81211</link>
      <description>&lt;P&gt;You can get quite far by using Format Pattern with &lt;EM&gt;&amp;lt;YYYY&amp;gt;&amp;lt;-&amp;gt;&amp;lt;MM&amp;gt;&amp;lt;-&amp;gt;&amp;lt;DD&amp;gt;&amp;lt;'T'&amp;gt;&amp;lt;hh24&amp;gt;&amp;lt;::&amp;gt;&amp;lt;mm&amp;gt;&amp;lt;::&amp;gt;&amp;lt;ss&amp;gt;Z&lt;/EM&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

date_str = "2022-12-23T14:54:50.123Z";

x = Informat(date_str,
	"Format Pattern",
	"&amp;lt;YYYY&amp;gt;&amp;lt;-&amp;gt;&amp;lt;MM&amp;gt;&amp;lt;-&amp;gt;&amp;lt;DD&amp;gt;&amp;lt;'T'&amp;gt;&amp;lt;hh24&amp;gt;&amp;lt;::&amp;gt;&amp;lt;mm&amp;gt;&amp;lt;::&amp;gt;&amp;lt;ss&amp;gt;Z"
);

show(x, Second(x));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(might have to do some rounding)&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 14:49:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Best-way-to-convert-UTC-time-format-to-numeric/m-p/611811#M81211</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-03-14T14:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to convert UTC time format to numeric</title>
      <link>https://community.jmp.com/t5/Discussions/Best-way-to-convert-UTC-time-format-to-numeric/m-p/611833#M81214</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Excellent, that is much more efficient at doing the conversion, thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 15:18:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Best-way-to-convert-UTC-time-format-to-numeric/m-p/611833#M81214</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2023-03-14T15:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Best way to convert UTC time format to numeric</title>
      <link>https://community.jmp.com/t5/Discussions/Best-way-to-convert-UTC-time-format-to-numeric/m-p/842345#M101616</link>
      <description>&lt;P&gt;Thanks, saved the day, had the same issue and because I put the Z between a set of &amp;lt; &amp;gt; it didn't work.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 12:01:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Best-way-to-convert-UTC-time-format-to-numeric/m-p/842345#M101616</guid>
      <dc:creator>Binyamin</dc:creator>
      <dc:date>2025-02-18T12:01:51Z</dc:date>
    </item>
  </channel>
</rss>

