<?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: How do I script to change the name of my columns, presently dates, to just the day? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-script-to-change-the-name-of-my-columns-presently-dates/m-p/378035#M62782</link>
    <description>Thanks Jim, this is great.</description>
    <pubDate>Mon, 19 Apr 2021 21:23:52 GMT</pubDate>
    <dc:creator>fionaweston</dc:creator>
    <dc:date>2021-04-19T21:23:52Z</dc:date>
    <item>
      <title>How do I script to change the name of my columns, presently dates, to just the day?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-to-change-the-name-of-my-columns-presently-dates/m-p/378002#M62779</link>
      <description>&lt;P&gt;I&amp;nbsp; want to change &lt;EM&gt;just&lt;/EM&gt; the numeric continuous columns in my sheet which are presently full dates and are in order from 1st to 31st to just the day&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex 03/01/2020 to 1&lt;/P&gt;&lt;P&gt;03/02/2020 to 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fionaweston_0-1618864273078.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32191i9EA8B4868EFA76D5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fionaweston_0-1618864273078.png" alt="fionaweston_0-1618864273078.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would also like to add a column to my sheet with the Abbv Name of the Month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:28:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-to-change-the-name-of-my-columns-presently-dates/m-p/378002#M62779</guid>
      <dc:creator>fionaweston</dc:creator>
      <dc:date>2023-06-10T23:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script to change the name of my columns, presently dates, to just the day?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-to-change-the-name-of-my-columns-presently-dates/m-p/378025#M62780</link>
      <description>&lt;P&gt;You could do it like 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 );

dt = New Table( "Dates",
	New Column( "date", "Numeric", "Continuous", Format( "Date Abbrev", 20 ), set values( Date DMY( Index( 1, 31 ), 3, 2020 ) ) )
);
Wait( 3 );

dt &amp;lt;&amp;lt; New Column( "Day", Formula( Day( :date ) ) );
dt:date &amp;lt;&amp;lt; hide();
dt &amp;lt;&amp;lt; New Column( "Month",
	Formula(
		Match( Month( :date ),
			1, "Jan",
			2, "Feb",
			3, "Mar",
			4, "Apr",
			5, "May",
			6, "Jun",
			7, "Jul",
			8, "Aug",
			9, "Sep",
			10, "Oct",
			11, "Nov",
			12, "Dec"
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Apr 2021 21:10:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-to-change-the-name-of-my-columns-presently-dates/m-p/378025#M62780</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2021-04-19T21:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script to change the name of my columns, presently dates, to just the day?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-to-change-the-name-of-my-columns-presently-dates/m-p/378028#M62781</link>
      <description>&lt;P&gt;Here is how I would solve your request&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

theMonth=.;
For( i = 1, i &amp;lt;= N Cols( dt ), i++,
	If( Substr( Column( dt, i ) &amp;lt;&amp;lt; get name, 1, 2 ) == "N(",
		If( isMissing(theMonth) == 1,
			theMonth = Month( Informat( Word( 2, Column( dt, i ) &amp;lt;&amp;lt; get name, "()" ), "m/d/y" ) );
		);
		Column( dt, i ) &amp;lt;&amp;lt; set name(
			Char( Day( Informat( Word( 2, Column( dt, i ) &amp;lt;&amp;lt; get name, "()" ), "m/d/y" ) ) )
		)
	)
);

monthList = {"Jan","Feb","Mar","Apr","May","Jun",
	"Jul","Aug","Sep","Oct","Nov","Dec"
};
dt &amp;lt;&amp;lt; New Column( monthList[theMonth]);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Apr 2021 21:17:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-to-change-the-name-of-my-columns-presently-dates/m-p/378028#M62781</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-04-19T21:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script to change the name of my columns, presently dates, to just the day?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-to-change-the-name-of-my-columns-presently-dates/m-p/378035#M62782</link>
      <description>Thanks Jim, this is great.</description>
      <pubDate>Mon, 19 Apr 2021 21:23:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-to-change-the-name-of-my-columns-presently-dates/m-p/378035#M62782</guid>
      <dc:creator>fionaweston</dc:creator>
      <dc:date>2021-04-19T21:23:52Z</dc:date>
    </item>
  </channel>
</rss>

