<?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: Difficulties Formatting Time Column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Difficulties-Formatting-Time-Column/m-p/248184#M48713</link>
    <description>&lt;P&gt;I replicated your findings, and the findings are the same for both JMP 14 and JMP 15.&amp;nbsp; I guess you will have to create a new column in JSL to do what you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to Here(1);
dt = New Table( "file",
	New Column( "a", character, values({"11:02"})));
	
	
dt&amp;lt;&amp;lt;new column("new time", numeric,informat("h:m"),format("h:m"),continuous,	
formula( informat(:a,"h:m")));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 19 Feb 2020 02:08:52 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-02-19T02:08:52Z</dc:date>
    <item>
      <title>Difficulties Formatting Time Column</title>
      <link>https://community.jmp.com/t5/Discussions/Difficulties-Formatting-Time-Column/m-p/248178#M48711</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a CSV of dates and times that I upload into JMP.&amp;nbsp; In order to create a single column with date/time I need to convert the data type and format of the column that contains the date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I use the script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Column("Actual Harvest Time") &amp;lt;&amp;lt; Data Type(Numeric); &amp;lt;&amp;lt; Format("h:m")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It totally clears the column of any data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also learned that when I manually change the column modeling type to Numeric and hit apply, that is where the data gets cleared.&amp;nbsp; If I manually change the column to Numeric AND the format to "h:m" at the same time and hit apply, the format is changed successfully.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm looking for a way to automate the formatting of the time column without losing any data.&amp;nbsp; Is there a way to do this without it clearing all my data?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I attached a screengrab of the manual column formatting changes for reference.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;div class="lia-vid-container video-embed-center"&gt;&lt;div id="lia-vid-MzMzI3ajE6Q06OpykuIpzeQRAdMspJofw1600h900r7" class="lia-video-brightcove-player-container"&gt;&lt;video-js data-video-id="1667783069774313671" data-account="6058004218001" data-player="default" data-embed="default" class="vjs-fluid" controls="" data-application-id="" style="width: 100%; height: 100%;"&gt;&lt;/video-js&gt;&lt;/div&gt;&lt;script src="https://players.brightcove.net/6058004218001/default_default/index.min.js"&gt;&lt;/script&gt;&lt;script&gt;(function() {  var wrapper = document.getElementById('lia-vid-MzMzI3ajE6Q06OpykuIpzeQRAdMspJofw1600h900r7');  var videoEl = wrapper ? wrapper.querySelector('video-js') : null;  if (videoEl) {     if (window.videojs) {       window.videojs(videoEl).ready(function() {         this.on('loadedmetadata', function() {           this.el().querySelectorAll('.vjs-load-progress div[data-start]').forEach(function(bar) {             bar.setAttribute('role', 'presentation');             bar.setAttribute('aria-hidden', 'true');           });         });       });     }  }})();&lt;/script&gt;&lt;a class="video-embed-link" href="https://community.jmp.com/t5/video/gallerypage/video-id/MzMzI3ajE6Q06OpykuIpzeQRAdMspJof"&gt;(view in My Videos)&lt;/a&gt;&lt;/div&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 12:42:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Difficulties-Formatting-Time-Column/m-p/248178#M48711</guid>
      <dc:creator>user8421</dc:creator>
      <dc:date>2020-02-19T12:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties Formatting Time Column</title>
      <link>https://community.jmp.com/t5/Discussions/Difficulties-Formatting-Time-Column/m-p/248184#M48713</link>
      <description>&lt;P&gt;I replicated your findings, and the findings are the same for both JMP 14 and JMP 15.&amp;nbsp; I guess you will have to create a new column in JSL to do what you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to Here(1);
dt = New Table( "file",
	New Column( "a", character, values({"11:02"})));
	
	
dt&amp;lt;&amp;lt;new column("new time", numeric,informat("h:m"),format("h:m"),continuous,	
formula( informat(:a,"h:m")));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Feb 2020 02:08:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Difficulties-Formatting-Time-Column/m-p/248184#M48713</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-02-19T02:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Difficulties Formatting Time Column</title>
      <link>https://community.jmp.com/t5/Discussions/Difficulties-Formatting-Time-Column/m-p/248212#M48721</link>
      <description>&lt;P&gt;Yes, if you change the data type first, then you lose the values. You must simultaneously provide the format of the date and time for the original character string version. Then JMP can convert the character string to the corresponding numeric value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example from the Scripting Index entry for the data column message &amp;lt;&amp;lt; Data Type():&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 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt &amp;lt;&amp;lt; New Column( "Time",
	"Character",
	"Nominal",
	Set Values( {"13:32", "20:10", "20:12", "14:56"} )
);
Wait( 2 );
dt:Time &amp;lt;&amp;lt; Data Type( Numeric, Format( "h:m", 12 ), Input Format( "h:m" ) );
dt:Time &amp;lt;&amp;lt; Modeling Type( "Continuous" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Feb 2020 10:55:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Difficulties-Formatting-Time-Column/m-p/248212#M48721</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-02-19T10:55:26Z</dc:date>
    </item>
  </channel>
</rss>

