<?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 Please help me to make a calculated column of date type. in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Please-help-me-to-make-a-calculated-column-of-date-type/m-p/532634#M75552</link>
    <description>&lt;P&gt;column1 = year&amp;nbsp; &amp;nbsp; &amp;nbsp;(ex, 2021, 2022)&lt;/P&gt;&lt;P&gt;column2 = month&amp;nbsp; (ex, Oct, Apr, )&lt;/P&gt;&lt;P&gt;column4 = day&amp;nbsp; &amp;nbsp; &amp;nbsp;(ex, 9, 10, 11)&lt;/P&gt;&lt;P&gt;(column 1,2,3 = string)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to make a new column in the form of a date by adding the calculation formula and merging the year, month,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What should I do?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:52:55 GMT</pubDate>
    <dc:creator>Ronaldo</dc:creator>
    <dc:date>2023-06-10T23:52:55Z</dc:date>
    <item>
      <title>Please help me to make a calculated column of date type.</title>
      <link>https://community.jmp.com/t5/Discussions/Please-help-me-to-make-a-calculated-column-of-date-type/m-p/532634#M75552</link>
      <description>&lt;P&gt;column1 = year&amp;nbsp; &amp;nbsp; &amp;nbsp;(ex, 2021, 2022)&lt;/P&gt;&lt;P&gt;column2 = month&amp;nbsp; (ex, Oct, Apr, )&lt;/P&gt;&lt;P&gt;column4 = day&amp;nbsp; &amp;nbsp; &amp;nbsp;(ex, 9, 10, 11)&lt;/P&gt;&lt;P&gt;(column 1,2,3 = string)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to make a new column in the form of a date by adding the calculation formula and merging the year, month,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What should I do?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:52:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Please-help-me-to-make-a-calculated-column-of-date-type/m-p/532634#M75552</guid>
      <dc:creator>Ronaldo</dc:creator>
      <dc:date>2023-06-10T23:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to make a calculated column of date type.</title>
      <link>https://community.jmp.com/t5/Discussions/Please-help-me-to-make-a-calculated-column-of-date-type/m-p/532640#M75554</link>
      <description>&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( "Date",
	Format( "m/d/y" ),
	formula(
		theList = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
		"Dec"};
		Date MDY( Contains( theList, :month ), Num( :day ), :year );
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you are doing this interactively, just go to the Cols pull down menu and select New Columns&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Change the name to Date, or whatever else you want it to be&lt;/LI&gt;
&lt;LI&gt;Click on the down arrow for the format, and select Dage=&amp;gt;m/d/y&lt;/LI&gt;
&lt;LI&gt;Click OK&lt;/LI&gt;
&lt;LI&gt;Right click on the header for the new column and select Formula&lt;/LI&gt;
&lt;LI&gt;Paste in the formula for the formula above&lt;/LI&gt;
&lt;LI&gt;Click on OK&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 11 Aug 2022 00:30:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Please-help-me-to-make-a-calculated-column-of-date-type/m-p/532640#M75554</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-08-11T00:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to make a calculated column of date type.</title>
      <link>https://community.jmp.com/t5/Discussions/Please-help-me-to-make-a-calculated-column-of-date-type/m-p/532973#M75577</link>
      <description>&lt;P&gt;&lt;SPAN&gt;First, thank you very much for your answer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm studying JMP while looking at your many answers&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't think I explained enough in this question, so I'll explain it again&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'd really appreciate it if you could help me again&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to make it in the target form in the fourth column of the JMP picture below&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use the concat function, I can make shapes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But the problem is that it becomes a character type&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to be a date type in the form of date/m/d/y&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Only then can we match the payment amount by date in the other data table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CramerRaoMink21_0-1660224390576.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44742i0312E2D8D97E5D21/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CramerRaoMink21_0-1660224390576.png" alt="CramerRaoMink21_0-1660224390576.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 13:33:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Please-help-me-to-make-a-calculated-column-of-date-type/m-p/532973#M75577</guid>
      <dc:creator>Ronaldo</dc:creator>
      <dc:date>2022-08-11T13:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Please help me to make a calculated column of date type.</title>
      <link>https://community.jmp.com/t5/Discussions/Please-help-me-to-make-a-calculated-column-of-date-type/m-p/533036#M75583</link>
      <description>&lt;P&gt;I understood what you were asking about.&amp;nbsp; The script and instructions I posted would work except for one small issue.&amp;nbsp; I assumed that your Year column was numeric.&amp;nbsp; You had clearly pointed out that the Day column was character, and the Month column had to be character.&amp;nbsp; But, you did not specify what the Year column was, so I assumed it was numeric.&amp;nbsp; The code below will recreate the sample data table you displayed and then will create the new column with the m/d/y format used for the Target column&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

// Recreate the Sample Data Table
New Table( "Sample",
	Add Rows( 4 ),
	New Column( "Year", Character, "Nominal", Set Values( {"2022", "2022", "2022", "2022"} ) ),
	New Column( "Month", Character, "Nominal", Set Values( {"Jan", "Jan", "Jan", "Jan"} ) ),
	New Column( "Day", Character, "Nominal", Set Values( {"1", "2", "3", "4"} ) )
);

// Create the Target column
dt = Current Data Table();
dt &amp;lt;&amp;lt; New Column( "Target",
	Format( "m/d/y" ),
	formula(
		theList = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov",
		"Dec"};
		Date MDY( Contains( theList, :month ), Num( :day ), Num( :year ) );
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1660229267283.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/44758i2B98CA5A383F3EAC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1660229267283.png" alt="txnelson_0-1660229267283.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 14:48:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Please-help-me-to-make-a-calculated-column-of-date-type/m-p/533036#M75583</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-08-11T14:48:04Z</dc:date>
    </item>
  </channel>
</rss>

