<?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: Creating and filling a new column with a formula in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45146#M25806</link>
    <description>Thank you. I have another question.&lt;BR /&gt;&lt;BR /&gt;I have a column in the table that lists Date/Time. I would like to generate a new column that lists the date and time separately. Is there a script command to do this?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;</description>
    <pubDate>Tue, 26 Sep 2017 18:11:30 GMT</pubDate>
    <dc:creator>spirotodd</dc:creator>
    <dc:date>2017-09-26T18:11:30Z</dc:date>
    <item>
      <title>Creating and filling a new column with a formula</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45100#M25775</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am attempting to use a script to generate a new column called "Sensor Power (W)" that takes the following formula:&lt;/P&gt;&lt;P&gt;Sensor Power (W) = ( Sensor Voltage x Sensor Current ) / 1000000&lt;/P&gt;&lt;P&gt;where Sensor Voltage and Sensor Current are formulas that already exist (in mV and mOhms).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Todd&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 23:51:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45100#M25775</guid>
      <dc:creator>spirotodd</dc:creator>
      <dc:date>2017-09-25T23:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and filling a new column with a formula</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45103#M25778</link>
      <description>&lt;P&gt;Here is the simple script that will do what you requested&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();
dt &amp;lt;&amp;lt; New Column( "Sensor Power", formula( :Sensor Voltage * :Sensor Current / 1000000 ) );
dt:Sensor Power &amp;lt;&amp;lt; set property( "Units", "W" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Sep 2017 00:57:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45103#M25778</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-09-26T00:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and filling a new column with a formula</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45146#M25806</link>
      <description>Thank you. I have another question.&lt;BR /&gt;&lt;BR /&gt;I have a column in the table that lists Date/Time. I would like to generate a new column that lists the date and time separately. Is there a script command to do this?&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;</description>
      <pubDate>Tue, 26 Sep 2017 18:11:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45146#M25806</guid>
      <dc:creator>spirotodd</dc:creator>
      <dc:date>2017-09-26T18:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and filling a new column with a formula</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45147#M25807</link>
      <description>&lt;P&gt;There is definatly a way to do what you want, however, a few more of the specifics are needed to be able to actually determine how to do what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Is the Date/Time column a JMP datetime value, or is it a character string?&amp;nbsp; JMP datetime column allow one to use one of a large number of formats, including ones that display both the date and time in the same column.&lt;/P&gt;
&lt;P&gt;2. If it is a character string, and not a JMP datetime value, what is the format of the data?&amp;nbsp; &amp;nbsp;(i.e. 21JUN2017 11:15:22, 01/05/1998 12:15AM, etc.)&lt;/P&gt;
&lt;P&gt;3. You state that you want the date and time in a new column.&amp;nbsp; Can you show what you want it to look like?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. Since the generation of a formula for a new column is available in a point and click formula generator, you should be really moving towards teaching yourself how to do things such as this.&amp;nbsp; Great documentation is availabe on this at:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Books==&amp;gt;Using JMP==&amp;gt;Formula Editor&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 18:37:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45147#M25807</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-09-26T18:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and filling a new column with a formula</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45151#M25808</link>
      <description>&lt;P&gt;The Date/Time column has the format: y/m/d h:m:s. It displays as "2017/04/10 7:53:35.935 AM"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to have a column titled 'Date' that has the same date format and a column titled 'Time' that displays in 24 hour time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the book reference. I am able to generate new columns with formulas by hand, it is JSL I am unfamiliar with. Do you know of a good reference for learning JSL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 18:45:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45151#M25808</guid>
      <dc:creator>spirotodd</dc:creator>
      <dc:date>2017-09-26T18:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and filling a new column with a formula</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45153#M25809</link>
      <description>&lt;P&gt;Attached is a sample data table that has a column called "date and time" which contains a JMP numeric DateTime value.&amp;nbsp; I then created 2 new columns, "date" and "time".&amp;nbsp; Each of them contain a formats that strips out just the date part and just the time part.&lt;/P&gt;
&lt;P&gt;The Column Info for the columns is what is used to format the columns to display the numeric values in a DateTime, Date or Time format.&lt;/P&gt;
&lt;P&gt;As far as resources on learning JSL, I always suggest reading the Scripting Guide&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Books==&amp;gt;Scripting Guide&lt;/P&gt;
&lt;P&gt;There are also many script examples in&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Sample Data==&amp;gt;Open the Sample Scripts Directory&lt;/P&gt;
&lt;P&gt;The definative reference material is at:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Scripting Index&lt;/P&gt;</description>
      <pubDate>Tue, 26 Sep 2017 19:09:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-and-filling-a-new-column-with-a-formula/m-p/45153#M25809</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-09-26T19:09:00Z</dc:date>
    </item>
  </channel>
</rss>

