<?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: Tricks to prevent incorrect input date formats from resulting in missing values? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/386983#M63715</link>
    <description>&lt;P&gt;I usually just create custom formulas to parse the dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One option that came into my mind, what if you would first change it to Numeric, Nominal with &lt;STRONG&gt;Best&lt;/STRONG&gt; as format. I think this would leave it for JMP to determine the correct format and make it a numerical if it can. After making it numerical you could go back to Format settings and choose the desired formatting.&lt;/P&gt;</description>
    <pubDate>Wed, 19 May 2021 19:19:48 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-05-19T19:19:48Z</dc:date>
    <item>
      <title>Tricks to prevent incorrect input date formats from resulting in missing values?</title>
      <link>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/386750#M63683</link>
      <description>&lt;P&gt;When importing a data set with a date column that defaults to character, it is common to change it to numeric and continuous.&amp;nbsp; Unfortunately if the input date format is incorrect any values that cannot be parsed are set to missing, thus you don't get a second chance at setting the input format.&amp;nbsp; How do you typically handle this in an exploratory/graphical user interface analysis?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I sometimes&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;duplicate the column before converting to numeric&lt;/LI&gt;
&lt;LI&gt;Create a new formula column to parse the date&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;To demonstrate the issue, run this code to create a table with some dates in m/d/y format, and then set that column to use d/m/y format, as shown in the screenshot below.&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);

//Make a table with dates in m/d/y format
vals = index(today()-in days(100), today(), incr=in hours(1));
dt = New Table( "Example Data for Input Date Format",
	Add Rows( n items(vals) ),
	New Column( "Dates mdy",
		Numeric,
		"Nominal",
		Format( "m/d/y h:m:s", 23, 0 ),
		Input Format( "m/d/y h:m" ),
		Set Values( vals )
	)
);

dt &amp;lt;&amp;lt; run formulas;
wait(1);
dt:Dates mdy &amp;lt;&amp;lt; data type("Character");&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now set all values at once in column info and note how some data is set to missing, even after changing the column back to character.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ih_0-1621427935764.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32951i6A3D6D5F1CB118C7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ih_0-1621427935764.png" alt="ih_0-1621427935764.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:30:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/386750#M63683</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2023-06-10T23:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Tricks to prevent incorrect input date formats from resulting in missing values?</title>
      <link>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/386807#M63689</link>
      <description>&lt;P&gt;The resulting missing values from Char to Num is due to the Input Format.&lt;/P&gt;
&lt;P&gt;Missing results start around row 113 with this "02/13/2021 12:23:50 AM". "d/m/y h:m" Input Format interprets it as the 13th month, which is invalid.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peng_liu_0-1621430693056.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32956i61A397B8F74AB921/image-size/medium?v=v2&amp;amp;px=400" role="button" title="peng_liu_0-1621430693056.png" alt="peng_liu_0-1621430693056.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;When there is a mistake in conversion, changing format back won't cut it, because the underlying values have been changed. The missing values no longer hold a valid time value. Use "Undo" under Edit instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 13:30:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/386807#M63689</guid>
      <dc:creator>peng_liu</dc:creator>
      <dc:date>2021-05-19T13:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Tricks to prevent incorrect input date formats from resulting in missing values?</title>
      <link>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/386863#M63699</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2781"&gt;@peng_liu&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes this perfectly describes the issue.&amp;nbsp; Sometimes either the top few rows appear to parse correctly and the user doesn't think to scroll down to see that lower rows in the table are set to missing, or most values parsed correctly but a few did not due to a data entry issue.&amp;nbsp; I am hoping to find a different way to help users parse dates so they are less likely to find out hours or days later that they have missing values.&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 19:22:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/386863#M63699</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-05-19T19:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Tricks to prevent incorrect input date formats from resulting in missing values?</title>
      <link>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/386983#M63715</link>
      <description>&lt;P&gt;I usually just create custom formulas to parse the dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One option that came into my mind, what if you would first change it to Numeric, Nominal with &lt;STRONG&gt;Best&lt;/STRONG&gt; as format. I think this would leave it for JMP to determine the correct format and make it a numerical if it can. After making it numerical you could go back to Format settings and choose the desired formatting.&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 19:19:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/386983#M63715</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-05-19T19:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Tricks to prevent incorrect input date formats from resulting in missing values?</title>
      <link>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/387023#M63719</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Okay I'm glad I'm not the only one to parse dates with a new column, I did just submit a wish list item to make this easier at&amp;nbsp;&lt;LI-MESSAGE title="Add Parse Date as a New Formula Column option" uid="387010" url="https://community.jmp.com/t5/JMP-Wish-List/Add-Parse-Date-as-a-New-Formula-Column-option/m-p/387010#U387010" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That 'best' trick is a good idea, I need to play with it a little more but at least for the m/d/y v d/m/y problem it would help.&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 19:38:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/387023#M63719</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-05-19T19:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Tricks to prevent incorrect input date formats from resulting in missing values?</title>
      <link>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/387033#M63720</link>
      <description>&lt;P&gt;JMP16's &lt;A href="https://www.jmp.com/support/help/en/16.0/index.shtml#page/jmp/custom-date-time-formatting-with-format-patterns.shtml" target="_self"&gt;Custom Date-Time Formatting with Format Patterns&lt;/A&gt; is also fairly helpful with date formatting. Previously I did either use the &lt;A href="https://community.jmp.com/t5/JMP-Add-Ins/Data-Table-Tools-Add-in/ta-p/28582" target="_self"&gt;Data Table Tools Add-in&lt;/A&gt; or write my own parse formulas, but hopefully JMP16 will make it easier.&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 19:43:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Tricks-to-prevent-incorrect-input-date-formats-from-resulting-in/m-p/387033#M63720</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-05-19T19:43:45Z</dc:date>
    </item>
  </channel>
</rss>

