<?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 to convert character date column running APR-14 to JAN-22 into Quarterly (Q1,Q2,Q3,Q4) labels? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452126#M69882</link>
    <description>&lt;P&gt;If you have JMP16 you could first convert the character column to date column with format pattern and then use Quarter function&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Current Data Table();
Column(dt, 1) &amp;lt;&amp;lt; Set Name("MonthYear");
Column(dt, 1) &amp;lt;&amp;lt; Data Type(Numeric, 
	Format("Format Pattern", "&amp;lt;Mmm&amp;gt;&amp;lt;-&amp;gt;&amp;lt;YY&amp;gt;", 35),
	Input Format("Format Pattern", "&amp;lt;Mmm&amp;gt;&amp;lt;-&amp;gt;&amp;lt;YY&amp;gt;")
);

dt &amp;lt;&amp;lt; New Column("Q", Numeric, Ordinal, Formula(Quarter(:MonthYear)));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you don't have JMP16 you could do "conversion list" of months and then use that instead to get Quarters&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;Formula for JMPs before 16 and no conversion to first column using list of months, contains(), word() and ceiling()&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column("Q",
	Numeric,
	Ordinal,
	Formula(
		Local({month_list = (month_list = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"})},
			Ceiling(Contains(month_list, Word(1, :MonthYear, "-")) / 3)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 18 Jan 2022 16:14:28 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-01-18T16:14:28Z</dc:date>
    <item>
      <title>How to convert character date column running APR-14 to JAN-22 into Quarterly (Q1,Q2,Q3,Q4) labels?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452081#M69881</link>
      <description>&lt;P&gt;In the past I have substracted Month only string (JAN) from Jan-14 and then recoded individual months to new label (JAN) = (Q1). However this tack is very manual, is there a formula i can embed to automate this in the future?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:09:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452081#M69881</guid>
      <dc:creator>DELANDJ1985</dc:creator>
      <dc:date>2023-06-09T18:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character date column running APR-14 to JAN-22 into Quarterly (Q1,Q2,Q3,Q4) labels?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452126#M69882</link>
      <description>&lt;P&gt;If you have JMP16 you could first convert the character column to date column with format pattern and then use Quarter function&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Current Data Table();
Column(dt, 1) &amp;lt;&amp;lt; Set Name("MonthYear");
Column(dt, 1) &amp;lt;&amp;lt; Data Type(Numeric, 
	Format("Format Pattern", "&amp;lt;Mmm&amp;gt;&amp;lt;-&amp;gt;&amp;lt;YY&amp;gt;", 35),
	Input Format("Format Pattern", "&amp;lt;Mmm&amp;gt;&amp;lt;-&amp;gt;&amp;lt;YY&amp;gt;")
);

dt &amp;lt;&amp;lt; New Column("Q", Numeric, Ordinal, Formula(Quarter(:MonthYear)));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you don't have JMP16 you could do "conversion list" of months and then use that instead to get Quarters&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;Formula for JMPs before 16 and no conversion to first column using list of months, contains(), word() and ceiling()&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column("Q",
	Numeric,
	Ordinal,
	Formula(
		Local({month_list = (month_list = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"})},
			Ceiling(Contains(month_list, Word(1, :MonthYear, "-")) / 3)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Jan 2022 16:14:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452126#M69882</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-01-18T16:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character date column running APR-14 to JAN-22 into Quarterly (Q1,Q2,Q3,Q4) labels?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452135#M69883</link>
      <description>&lt;P&gt;Appreciate the quick response - I'm on JMP 14 so do not have format pattern. I have added a sample file, could you perhaps show me how to use conversion list?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 16:18:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452135#M69883</guid>
      <dc:creator>DELANDJ1985</dc:creator>
      <dc:date>2022-01-18T16:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character date column running APR-14 to JAN-22 into Quarterly (Q1,Q2,Q3,Q4) labels?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452141#M69884</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DELANDJ1985_0-1642523359094.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/39083i48EF1007D3DB5D3A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DELANDJ1985_0-1642523359094.png" alt="DELANDJ1985_0-1642523359094.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attempted to apply but perhaps i have input formula with basic error?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 16:30:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452141#M69884</guid>
      <dc:creator>DELANDJ1985</dc:creator>
      <dc:date>2022-01-18T16:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character date column running APR-14 to JAN-22 into Quarterly (Q1,Q2,Q3,Q4) labels?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452147#M69885</link>
      <description>&lt;P&gt;Create new column and then add this as formula:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Local({month_list = (month_list = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"})},
			Ceiling(Contains(month_list, Word(1, :MonthYear, "-")) / 3)
		)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Make sure you have correct column name in :MonthYear (in image below it is A)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1642523841339.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/39084i8CF03FE260F9E17A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1642523841339.png" alt="jthi_0-1642523841339.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 16:37:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452147#M69885</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-01-18T16:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert character date column running APR-14 to JAN-22 into Quarterly (Q1,Q2,Q3,Q4) labels?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452345#M69905</link>
      <description>&lt;P&gt;Thanks Jarmo - the local variable feature is new to me but looks like it could be a game changer if i get the hang of it!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jan 2022 12:30:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-convert-character-date-column-running-APR-14-to-JAN-22/m-p/452345#M69905</guid>
      <dc:creator>DELANDJ1985</dc:creator>
      <dc:date>2022-01-19T12:30:21Z</dc:date>
    </item>
  </channel>
</rss>

