<?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: Checking if date column value is before/after a given date in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/476459#M72096</link>
    <description>&lt;P&gt;Thank you to everyone who replied. I ended up converting the format of my date column to "Best" as jthi suggested which converted each date value into seconds from Jan 1, 1904. This made it easy to compare with the date I was interested in.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Apr 2022 01:13:56 GMT</pubDate>
    <dc:creator>JonathanL</dc:creator>
    <dc:date>2022-04-06T01:13:56Z</dc:date>
    <item>
      <title>Checking if date column value is before/after a given date</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/475999#M72052</link>
      <description>&lt;P&gt;I am using JMP pro 15.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a column in my dataset "MRI_Date" which has values in the format MM/DD/YYYY. I would like to create a new formula column checking whether each value of MRI_Date is before or after the date 06/04/2014 and return "yes" if before and "no" if after.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this formula but it is not returning accurate results:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If( :MRI_Date &amp;lt; "06/04/2014",&lt;BR /&gt;:before_6_4_14 = "yes",&lt;BR /&gt;:before_6_4_14 = "no"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The name of my formula column is "before_6_4_14".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone recommend a solution to this issue? Possibly the format of my MRI_Date column?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:46:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/475999#M72052</guid>
      <dc:creator>JonathanL</dc:creator>
      <dc:date>2023-06-10T23:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Checking if date column value is before/after a given date</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/476020#M72053</link>
      <description>&lt;P&gt;I would start testing out that you are using correctly formatted dates. Change the Format of your date column to Best and see if you get JMP's DateNum (something like 3731949420, which is &lt;SPAN class="ILfuVd"&gt;&lt;SPAN class="hgKElc"&gt;number of seconds since midnight, January 1, 1904&lt;/SPAN&gt;&lt;/SPAN&gt;). If you get something different, you might have to do some conversions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"06/04/2014" isn't correct date in JMP, you can for example use &lt;EM&gt;Date MDY()&lt;/EM&gt; (&lt;EM&gt;Date MDY(06,04,2014)&lt;/EM&gt;) or &lt;EM&gt;InFormat()&lt;/EM&gt; (&lt;EM&gt;Informat("06/04/2014", "MM/DD/YYYY")&lt;/EM&gt;) to convert that to a date. I would use &lt;EM&gt;Date MDY()&lt;/EM&gt; as it should always work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After that you should be able to do the comparison like you are doing, or you could use something like Date Difference().&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 17:42:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/476020#M72053</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-04-04T17:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: Checking if date column value is before/after a given date</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/476060#M72061</link>
      <description>&lt;P&gt;Take a look at&amp;nbsp;&lt;LI-MESSAGE title="Using dates, times, datetimes and durations in JMP" uid="68689" url="https://community.jmp.com/t5/JMPer-Cable/Using-dates-times-datetimes-and-durations-in-JMP/m-p/68689#U68689" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;. You can use a date constant for comparisons like this.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( :MRI_Date &amp;lt; 04JUN2014,&lt;BR /&gt;   :before_6_4_14 = "yes",
   :before_6_4_14 = "no"
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Apr 2022 20:01:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/476060#M72061</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2022-04-04T20:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Checking if date column value is before/after a given date</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/476068#M72064</link>
      <description>&lt;P&gt;if MRI_Date is a character column the comparison won't be correct (year is in least important position, etc). When you use the column properties to convert the column to a proper date column, be sure to change Numeric AND Format at the same time. If you change to numeric without the proper date format, you'll likely see all missing values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Character columns tend to be left-aligned and numeric columns right-aligned. Dates are numeric, number of seconds since 1904.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 01:36:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/476068#M72064</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2022-04-05T01:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: Checking if date column value is before/after a given date</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/476197#M72077</link>
      <description>&lt;P&gt;Since you are using a column formula, you can abbreviate&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6878"&gt;@Jeff_Perkinson&lt;/a&gt;'s solution with this formula:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( :MRI_Date &amp;lt; 04JUN2014, "yes", "no" )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Apr 2022 12:12:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/476197#M72077</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2022-04-05T12:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Checking if date column value is before/after a given date</title>
      <link>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/476459#M72096</link>
      <description>&lt;P&gt;Thank you to everyone who replied. I ended up converting the format of my date column to "Best" as jthi suggested which converted each date value into seconds from Jan 1, 1904. This made it easy to compare with the date I was interested in.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 01:13:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Checking-if-date-column-value-is-before-after-a-given-date/m-p/476459#M72096</guid>
      <dc:creator>JonathanL</dc:creator>
      <dc:date>2022-04-06T01:13:56Z</dc:date>
    </item>
  </channel>
</rss>

