<?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: JMP date convert not working? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JMP-date-convert-not-working/m-p/880220#M104391</link>
    <description>&lt;P&gt;The reason for this is because a date of the form "20191107" is not actually a number, it is a character string. For example, consider which date would come after&amp;nbsp;"20191130"; the next string should be&amp;nbsp;"20191201", not "20191131". This is not the behavior of a number, but rather of a numerical representation of a Date object. Here's some more info on this topic:&amp;nbsp;&lt;A href="https://community.jmp.com/t5/JMPer-Cable/Using-dates-times-datetimes-and-durations-in-JMP/ba-p/68689#:~:text=As%20in%20most%20analytic%20applications%2C%20datetime%20values%20are,number%20of%20seconds%20since%20midnight%2C%20January%201%2C%201904." target="_blank"&gt;Using dates, times, datetimes and durations in JMP&lt;/A&gt;. (JMP's underlying encoding of dates and times in is seconds, hence the strange looking conversion you noted above).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP is usually good at detecting date strings and automatically converting them from Character to Numeric type (which can then be set to display as a date in the preferred Format). For example, it would be obvious to us (and to JMP) that a string of the form "2019-11-07" is a Character string and not a Number. However in this case, dates of the form yyyymmdd look just like numbers, so the extra step of converting to Character is needed, otherwise JMP will treat it as a regular number.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need to perform this conversion often, one option would be to create a Formula column with the following:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Format(Parse Date( Char( :Column 1 ), "yyyymmdd" ),"yyyy-mm-dd")&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 17 Jun 2025 14:42:59 GMT</pubDate>
    <dc:creator>christian-z</dc:creator>
    <dc:date>2025-06-17T14:42:59Z</dc:date>
    <item>
      <title>JMP date convert not working?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-date-convert-not-working/m-p/879779#M104316</link>
      <description>&lt;P&gt;I hope someone can help with this. &amp;nbsp;I imported an excel file with a column of dates in the format yyyymmdd. &amp;nbsp;It didn't recognize this data as time, so I tried to change it by selecting column info &amp;gt; Format &amp;gt; Date&amp;gt;yyyymmdd.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it then converts all of my dates to some other number &amp;nbsp;but it seems that the number is the same for all my dates. Obv. this is a pretty standard task so I guess I am doing something wrong. I have attached a screenshot of my data the left column is the original, the right one is where I took that column and converted it the way that I described.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-06-13 at 10.54.39 AM.png" style="width: 196px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/76909iE7915ECBA20C10B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-06-13 at 10.54.39 AM.png" alt="Screenshot 2025-06-13 at 10.54.39 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;version &amp;nbsp;&lt;STRONG&gt;JMP® Pro &lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;18.0.2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the help. Any other advice on getting JMP to recognize time correctly would be really valuable.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 16:02:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-date-convert-not-working/m-p/879779#M104316</guid>
      <dc:creator>TMS</dc:creator>
      <dc:date>2025-06-13T16:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: JMP date convert not working?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-date-convert-not-working/m-p/879800#M104318</link>
      <description>&lt;P&gt;You could for example use a formula such as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;In Format(Char(:"daily end (NZT)"n), "YYYYMMDD")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or first convert your date column into character and then back to numeric while changing the format using Format Pattern&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="tinyMceEditor_618f010de3c816jthi_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&lt;BR /&gt;
&lt;DIV class="lia-progress-placeholder mceNonEditable"&gt;
&lt;DIV class="lia-media-progress"&gt;&lt;I class="lia-fa lia-media-upload-progress lia-fa-picture-o"&gt;&lt;/I&gt;
&lt;DIV class="lia-progress-bar-stripes lia-progress-bar-animate lia-media-progress-bar"&gt;
&lt;DIV class="lia-progress-bar" style="width: 100%;"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;SPAN class="lia-progress-value"&gt;Updating Media&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="tinyMceEditor_618f010de3c816jthi_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 16:13:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-date-convert-not-working/m-p/879800#M104318</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-06-13T16:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: JMP date convert not working?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-date-convert-not-working/m-p/879812#M104320</link>
      <description>&lt;P&gt;This helped, thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;first I had to convert the column to character. then I immediately change it back to numeric and when I do so I also select the format as date and yyyymmdd and hit apply and it works - or at least it doesn't overwrite the dates with some other number.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would love to hear from JMP why it is necessary to change it to character first. &amp;nbsp;It's not obvious to a new user why this would be needed. Seems like an unneccessary step and should be in the standard instructions somewhere.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 16:49:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-date-convert-not-working/m-p/879812#M104320</guid>
      <dc:creator>TMS</dc:creator>
      <dc:date>2025-06-13T16:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: JMP date convert not working?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-date-convert-not-working/m-p/879814#M104321</link>
      <description>&lt;P&gt;Formatting is used to change how the &lt;STRONG&gt;number is being displayed &lt;/STRONG&gt;not the value is my guess -&amp;gt; converting to character allows you to basically bypass this and allows JMP to "recalculate" the string into a number.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 17:23:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-date-convert-not-working/m-p/879814#M104321</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-06-13T17:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: JMP date convert not working?</title>
      <link>https://community.jmp.com/t5/Discussions/JMP-date-convert-not-working/m-p/880220#M104391</link>
      <description>&lt;P&gt;The reason for this is because a date of the form "20191107" is not actually a number, it is a character string. For example, consider which date would come after&amp;nbsp;"20191130"; the next string should be&amp;nbsp;"20191201", not "20191131". This is not the behavior of a number, but rather of a numerical representation of a Date object. Here's some more info on this topic:&amp;nbsp;&lt;A href="https://community.jmp.com/t5/JMPer-Cable/Using-dates-times-datetimes-and-durations-in-JMP/ba-p/68689#:~:text=As%20in%20most%20analytic%20applications%2C%20datetime%20values%20are,number%20of%20seconds%20since%20midnight%2C%20January%201%2C%201904." target="_blank"&gt;Using dates, times, datetimes and durations in JMP&lt;/A&gt;. (JMP's underlying encoding of dates and times in is seconds, hence the strange looking conversion you noted above).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP is usually good at detecting date strings and automatically converting them from Character to Numeric type (which can then be set to display as a date in the preferred Format). For example, it would be obvious to us (and to JMP) that a string of the form "2019-11-07" is a Character string and not a Number. However in this case, dates of the form yyyymmdd look just like numbers, so the extra step of converting to Character is needed, otherwise JMP will treat it as a regular number.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need to perform this conversion often, one option would be to create a Formula column with the following:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Format(Parse Date( Char( :Column 1 ), "yyyymmdd" ),"yyyy-mm-dd")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Jun 2025 14:42:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JMP-date-convert-not-working/m-p/880220#M104391</guid>
      <dc:creator>christian-z</dc:creator>
      <dc:date>2025-06-17T14:42:59Z</dc:date>
    </item>
  </channel>
</rss>

