<?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: Changing a date and time column to yield only the date. in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Changing-a-date-and-time-column-to-yield-only-the-date/m-p/53692#M30343</link>
    <description>&lt;P&gt;could always turn the time in seconds to days and floor it then turn it back into seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x = today();
show(MDYHMS(x));
show(MDYHMS(floor(x/(60*60*24))*60*60*24));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 22 Mar 2018 23:33:56 GMT</pubDate>
    <dc:creator>vince_faller</dc:creator>
    <dc:date>2018-03-22T23:33:56Z</dc:date>
    <item>
      <title>Changing a date and time column to yield only the date.</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-a-date-and-time-column-to-yield-only-the-date/m-p/53625#M30314</link>
      <description>&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like help with changing a date and time column to yield only the date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have changed the date and time column to show only the date via the column info but when I'm tring to make a vairability chart using the date as an X axis, I am still getiing the&amp;nbsp;date and the time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 20:59:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-a-date-and-time-column-to-yield-only-the-date/m-p/53625#M30314</guid>
      <dc:creator>ileshem</dc:creator>
      <dc:date>2018-03-21T20:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a date and time column to yield only the date.</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-a-date-and-time-column-to-yield-only-the-date/m-p/53632#M30320</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/8850"&gt;@ileshem&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Data formats don't change the actual underlying values, just how they are displayed.&amp;nbsp; There may be a better way to do this, but I often just create a new column where I take the value in the original data-time column and format it with a column formula like so:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Format(:Column 1, "m/d/y")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This drops the time data so that it is effectively changed to the 12:00:00 am.&amp;nbsp; Then, I delete the column formula and change the new column's format to the desired date format in Column Info.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 22:48:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-a-date-and-time-column-to-yield-only-the-date/m-p/53632#M30320</guid>
      <dc:creator>cwillden</dc:creator>
      <dc:date>2018-03-21T22:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a date and time column to yield only the date.</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-a-date-and-time-column-to-yield-only-the-date/m-p/53692#M30343</link>
      <description>&lt;P&gt;could always turn the time in seconds to days and floor it then turn it back into seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;x = today();
show(MDYHMS(x));
show(MDYHMS(floor(x/(60*60*24))*60*60*24));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Mar 2018 23:33:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-a-date-and-time-column-to-yield-only-the-date/m-p/53692#M30343</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2018-03-22T23:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Changing a date and time column to yield only the date.</title>
      <link>https://community.jmp.com/t5/Discussions/Changing-a-date-and-time-column-to-yield-only-the-date/m-p/53718#M30355</link>
      <description>&lt;P&gt;Datetime values are stored as the number of seconds since January 4, 1904 00:00:00 (midnight).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Date values are also stored as the number of seconds since midnight, January 4, 1904 to midnight on the date in question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since both values are stored as seconds, you just need to subtract the time of day portion from a datetime value to get the date value.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//today() returns the current date and time
datetime=today();

//subtract the time portion of datetime
date=datetime - time of day(datetime);

//show datetime and date as seconds and then format date to see the date
show(datetime, date, format(date, "mm/dd/yy"));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This can also be done in the formula editor to create a new column with the date. The easiest way is to right click at the top of the datetime column and choose New Formula-&amp;gt;Date Time-&amp;gt;Date.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JMPScreenSnapz187.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/10043iC06516A84980073A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JMPScreenSnapz187.png" alt="JMPScreenSnapz187.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 19:39:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Changing-a-date-and-time-column-to-yield-only-the-date/m-p/53718#M30355</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2018-03-23T19:39:07Z</dc:date>
    </item>
  </channel>
</rss>

