<?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: Unable to Convert Character Column to Continuous Date Format Using JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Unable-to-Convert-Character-Column-to-Continuous-Date-Format/m-p/921467#M108017</link>
    <description>&lt;P&gt;You are doing &amp;lt;&amp;lt; Data Type("Numeric") first -&amp;gt; it will be converted to number too early.&amp;nbsp;Do it manually in JMP, look at the log and copy the script.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Change column info: Column 1
Data Table("Untitled"):Column 1 &amp;lt;&amp;lt; Set Data Type(
	Numeric,
	Format("Format Pattern", "&amp;lt;DD&amp;gt;&amp;lt;-&amp;gt;&amp;lt;MM&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;&amp;lt;::&amp;gt;&amp;lt;ss&amp;gt;", 19, 0),
	Input Format("Format Pattern", "&amp;lt;DD&amp;gt;&amp;lt;-&amp;gt;&amp;lt;MM&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;&amp;lt;::&amp;gt;&amp;lt;ss&amp;gt;", 0)
) &amp;lt;&amp;lt; Set Modeling Type("Continuous");
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Scripting Index also has an example on how to change data type while applying formatting&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1766813326876.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/89734iEC89C684D92EC534/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_0-1766813326876.png" alt="jthi_0-1766813326876.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Dec 2025 05:29:19 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2025-12-27T05:29:19Z</dc:date>
    <item>
      <title>Unable to Convert Character Column to Continuous Date Format Using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Unable-to-Convert-Character-Column-to-Continuous-Date-Format/m-p/921437#M108014</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have an input table with a column TEST_START_DATETIME that JMP initially recognizes as a Character/Nominal Data/Modeling Type as shown below.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ClassDendrogram_0-1766798968667.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/89723i92112B686DFDE01E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ClassDendrogram_0-1766798968667.png" alt="ClassDendrogram_0-1766798968667.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I can set this column as a continuous date/time format type using the Column Info dialog.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ClassDendrogram_1-1766799077820.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/89724i4E959B25AD827307/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ClassDendrogram_1-1766799077820.png" alt="ClassDendrogram_1-1766799077820.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Note the text is shifted to the right, indicating it's a cell.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ClassDendrogram_2-1766799137209.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/89725i70C259C7EB1FC2C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ClassDendrogram_2-1766799137209.png" alt="ClassDendrogram_2-1766799137209.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, when I try to do this in JSL I get an empty column. It looks like it converted the column to numeric type before applying the format type, causing it to get deleted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();

dt &amp;lt;&amp;lt; Begin Data Update;
	dt:TEST_START_DATETIME &amp;lt;&amp;lt; Data Type("Numeric");
	dt:TEST_START_DATETIME &amp;lt;&amp;lt; Modeling Type("Continuous");
	dt:TEST_START_DATETIME &amp;lt;&amp;lt; Input Format("Format Pattern", "&amp;lt;YYYY&amp;gt;_&amp;lt;MM&amp;gt;_&amp;lt;DD&amp;gt;-&amp;lt;hh24&amp;gt;_&amp;lt;mm&amp;gt;_&amp;lt;ss&amp;gt;");
	dt:TEST_START_DATETIME &amp;lt;&amp;lt; Format("Format Pattern", "&amp;lt;YYYY&amp;gt;_&amp;lt;MM&amp;gt;_&amp;lt;DD&amp;gt;-&amp;lt;hh24&amp;gt;_&amp;lt;mm&amp;gt;_&amp;lt;ss&amp;gt;");
dt &amp;lt;&amp;lt; End Data Update;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What could I be doing wrong?&lt;/P&gt;</description>
      <pubDate>Sat, 27 Dec 2025 01:37:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Unable-to-Convert-Character-Column-to-Continuous-Date-Format/m-p/921437#M108014</guid>
      <dc:creator>ClassDendrogram</dc:creator>
      <dc:date>2025-12-27T01:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Convert Character Column to Continuous Date Format Using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Unable-to-Convert-Character-Column-to-Continuous-Date-Format/m-p/921467#M108017</link>
      <description>&lt;P&gt;You are doing &amp;lt;&amp;lt; Data Type("Numeric") first -&amp;gt; it will be converted to number too early.&amp;nbsp;Do it manually in JMP, look at the log and copy the script.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Change column info: Column 1
Data Table("Untitled"):Column 1 &amp;lt;&amp;lt; Set Data Type(
	Numeric,
	Format("Format Pattern", "&amp;lt;DD&amp;gt;&amp;lt;-&amp;gt;&amp;lt;MM&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;&amp;lt;::&amp;gt;&amp;lt;ss&amp;gt;", 19, 0),
	Input Format("Format Pattern", "&amp;lt;DD&amp;gt;&amp;lt;-&amp;gt;&amp;lt;MM&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;&amp;lt;::&amp;gt;&amp;lt;ss&amp;gt;", 0)
) &amp;lt;&amp;lt; Set Modeling Type("Continuous");
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Scripting Index also has an example on how to change data type while applying formatting&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1766813326876.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/89734iEC89C684D92EC534/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_0-1766813326876.png" alt="jthi_0-1766813326876.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Dec 2025 05:29:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Unable-to-Convert-Character-Column-to-Continuous-Date-Format/m-p/921467#M108017</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-12-27T05:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Convert Character Column to Continuous Date Format Using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Unable-to-Convert-Character-Column-to-Continuous-Date-Format/m-p/921541#M108027</link>
      <description>&lt;P&gt;Thanks! I looked at the output log, copied the same script and it now works when run as a standalone script. I didn't know that the log window could be used to see commands invoked through GUI in real time.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();


dt:TEST_START_DATETIME &amp;lt;&amp;lt; Set Data Type(
		Numeric,
		Format( "Format Pattern", "&amp;lt;YYYY&amp;gt;_&amp;lt;MM&amp;gt;_&amp;lt;DD&amp;gt;-&amp;lt;hh24&amp;gt;_&amp;lt;mm&amp;gt;_&amp;lt;ss&amp;gt;", 19, 0 ),
		Input Format( "Format Pattern", "&amp;lt;YYYY&amp;gt;_&amp;lt;MM&amp;gt;_&amp;lt;DD&amp;gt;-&amp;lt;hh24&amp;gt;_&amp;lt;mm&amp;gt;_&amp;lt;ss&amp;gt;", 0 )
	) &amp;lt;&amp;lt; Set Modeling Type( "Continuous" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 27 Dec 2025 18:19:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Unable-to-Convert-Character-Column-to-Continuous-Date-Format/m-p/921541#M108027</guid>
      <dc:creator>ClassDendrogram</dc:creator>
      <dc:date>2025-12-27T18:19:31Z</dc:date>
    </item>
  </channel>
</rss>

