<?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: Using Char to compare numeric and character values in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597902#M80153</link>
    <description>&lt;P&gt;Or even this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need." style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49881i651D4A0216E22B01/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Feb 2023 12:02:18 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2023-02-07T12:02:18Z</dc:date>
    <item>
      <title>Using Char to compare numeric and character values</title>
      <link>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597860#M80144</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is it possible to compare numeric and character values?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to compare two columns (identical or different values). One column has a numeric date and one has a character date and as I need to compare only parts of it I want to use substring. The below script runs, but it doesn´t get me the correct result as all appears to be different (which is not the case). Am I using Char wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Substr( Char( :Name( "Date/Time of Specimen Collection" ) ), 1, 10 ) == Substr( :Name( "Start Date/Time of Visit" ), 1, 10 ),
"identical",
"different"
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I know I can change the format of "Date/Time of Specimen Collection" but I prefer not to as it will complicate other parts of my script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:38:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597860#M80144</guid>
      <dc:creator>JulieSAppel</dc:creator>
      <dc:date>2023-06-08T16:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Using Char to compare numeric and character values</title>
      <link>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597871#M80145</link>
      <description>&lt;P&gt;To understand what's happening, make a temporary column with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Char( :Name( "Date/Time of Specimen Collection" ) )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;as the formula. You'll probably need to use the format(...) function (instead of char(...)) to specify the exact date-time format you need to get all the values and separator characters correct. You can see the available format names when you use the column properties dialog and look at the format...date section.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 10:40:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597871#M80145</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-02-07T10:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using Char to compare numeric and character values</title>
      <link>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597884#M80146</link>
      <description>&lt;P&gt;I see your point. I cannot seem to get it right using format though.&lt;/P&gt;&lt;P&gt;Is there anyway of doing this without creating extra columns?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 11:22:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597884#M80146</guid>
      <dc:creator>JulieSAppel</dc:creator>
      <dc:date>2023-02-07T11:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using Char to compare numeric and character values</title>
      <link>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597887#M80147</link>
      <description>&lt;P&gt;Yes. What is the format of the character date?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 11:23:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597887#M80147</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-02-07T11:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using Char to compare numeric and character values</title>
      <link>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597892#M80149</link>
      <description>&lt;P&gt;In the attached table snip I´m trying to compare the date part of "Date/Time of Specimen Collection" column (numeric, yyy-mm-ddThh:mm:ss) with the "Start Date/Time of Visit" column (character, nominal)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a function that allows jmp to see the numerical values as character (formatted as a date of course) so that I can use substring for the date part of it?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 11:40:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597892#M80149</guid>
      <dc:creator>JulieSAppel</dc:creator>
      <dc:date>2023-02-07T11:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using Char to compare numeric and character values</title>
      <link>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597893#M80150</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year." style="width: 907px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49879i4D4C1B9369B3BF0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Using the format() function; the numeric date is in year-month-day for 7 February; the character format is in day/month/year.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 11:42:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597893#M80150</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-02-07T11:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using Char to compare numeric and character values</title>
      <link>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597895#M80151</link>
      <description>&lt;P&gt;You might need this format:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="the T format is an ISO standard." style="width: 466px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49880i6F0001E877FF3B06/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="the T format is an ISO standard." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;the T format is an ISO standard.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 11:53:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597895#M80151</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-02-07T11:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Using Char to compare numeric and character values</title>
      <link>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597902#M80153</link>
      <description>&lt;P&gt;Or even this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need." style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49881i651D4A0216E22B01/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;You don't need substr for the yyy-mm-dd format; it already returns just the 10 characters you need.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 12:02:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597902#M80153</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-02-07T12:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using Char to compare numeric and character values</title>
      <link>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597947#M80157</link>
      <description>&lt;P&gt;Thanks a lot - I´ll give that a shot :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 12:58:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Using-Char-to-compare-numeric-and-character-values/m-p/597947#M80157</guid>
      <dc:creator>JulieSAppel</dc:creator>
      <dc:date>2023-02-07T12:58:13Z</dc:date>
    </item>
  </channel>
</rss>

