<?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: Date formatting in Number Edit Box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Date-formatting-in-Number-Edit-Box/m-p/47759#M27202</link>
    <description>&lt;P&gt;Try putting a T between the date and time portion.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;startDateEB &amp;lt;&amp;lt; Set Format( Format( "yyyy-mm-ddThh:mm:ss" ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the Numeric Formats section of the help page for the Column Info dialog box (text edit boxes use the same formats):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="HeadMinor"&gt;Time Formats&lt;/DIV&gt;&lt;DIV class="body"&gt;When you choose a Time format, you can also specify an Input Format. The Time format indicates how the time appears in the data table cells, and the Input Format indicates how you enter the time.&lt;/DIV&gt;&lt;DIV class="N1bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;• &lt;/SPAN&gt;&lt;/SPAN&gt;You can add the number of hours, minutes, and seconds after midnight of the prepended date for the following date formats:&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;m/d/y&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;d/m/y&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;y/m/d&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;ddMonyyyy&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;Monddyyyy&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;Locale Date&lt;/DIV&gt;&lt;DIV class="indent1"&gt;For example, December 31, 2004 has a numeric value of 3,187,296,600, which represents 12/31/2004 12:10 AM.&lt;/DIV&gt;&lt;DIV class="N1bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;• &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="command"&gt;:day:hr:m&lt;/SPAN&gt; and &lt;SPAN class="command"&gt;:day:hr:m:s &lt;/SPAN&gt;show the number of days, hours, minutes, and seconds since &lt;SPAN class="Emphasis"&gt;January 1, 1904&lt;/SPAN&gt;. For example, the results for December 31, 2004 are :36890:00:10: and :36890:00:10:00.&lt;/DIV&gt;&lt;DIV class="N1bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;• &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="command"&gt;h:m:s&lt;/SPAN&gt; and &lt;SPAN class="command"&gt;h:m &lt;/SPAN&gt;show the hours, minutes, and seconds portion of the date in the date field. For example, the results for December 31, 2004 at 12:10 AM are 12:10:00 AM and 12:10 AM.&lt;/DIV&gt;&lt;DIV class="N1bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;• &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="command"&gt;yyyy-mm-ddThh:mm&lt;/SPAN&gt; and &lt;SPAN class="command"&gt;yyyy-mm-ddThh:mm:ss &lt;/SPAN&gt;show the year, month, day, and time. For example, 2004-12-31T12:10:00. T is a literal value, representing itself.&lt;/DIV&gt;</description>
    <pubDate>Tue, 28 Nov 2017 13:20:12 GMT</pubDate>
    <dc:creator>ih</dc:creator>
    <dc:date>2017-11-28T13:20:12Z</dc:date>
    <item>
      <title>Date formatting in Number Edit Box</title>
      <link>https://community.jmp.com/t5/Discussions/Date-formatting-in-Number-Edit-Box/m-p/47758#M27201</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get my date formatted in a particular way.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've already looked at&amp;nbsp;&lt;A href="http://www.jmp.com/support/help/Date-Time_Functions_and_Formats.shtml" target="_blank"&gt;http://www.jmp.com/support/help/Date-Time_Functions_and_Formats.shtml&lt;/A&gt;&amp;nbsp;for the formatting but see no option that is appropriate for the format I need.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I have it set as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;startDate = As Date( Today() - 86400 ); //get current time for yesterday
startDateEB = Number Edit Box( startDate, 10 );
startDateEB &amp;lt;&amp;lt; Set Format( Format( "yyyy-mm-dd" ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Which gives boxes like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Capture.PNG" style="width: 141px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8463iFF2CE7BDD20266A0/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The contents of this number edit box is inserted into a query later on(so needs to be in a format like 2017-11-28 07:30:00), and the above works fine when wanting to query data for entire days, but when you want to pull a specific window of time it doesn't allow for this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've attempted changing the Set Format(Format()) paramaters&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;startDateEB &amp;lt;&amp;lt; Set Format( Format( "yyyy-mm-dd hh:mm" ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But Format won't accept this and just returns the numeric value of the date-time.&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Capture2.PNG" style="width: 141px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8464i37C1423AF379CAA3/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some warkaround for this?&lt;/P&gt;&lt;P&gt;Or a different approach entirely?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2017 12:42:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-formatting-in-Number-Edit-Box/m-p/47758#M27201</guid>
      <dc:creator>itsalkskeith</dc:creator>
      <dc:date>2017-11-28T12:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Date formatting in Number Edit Box</title>
      <link>https://community.jmp.com/t5/Discussions/Date-formatting-in-Number-Edit-Box/m-p/47759#M27202</link>
      <description>&lt;P&gt;Try putting a T between the date and time portion.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;startDateEB &amp;lt;&amp;lt; Set Format( Format( "yyyy-mm-ddThh:mm:ss" ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the Numeric Formats section of the help page for the Column Info dialog box (text edit boxes use the same formats):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="HeadMinor"&gt;Time Formats&lt;/DIV&gt;&lt;DIV class="body"&gt;When you choose a Time format, you can also specify an Input Format. The Time format indicates how the time appears in the data table cells, and the Input Format indicates how you enter the time.&lt;/DIV&gt;&lt;DIV class="N1bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;• &lt;/SPAN&gt;&lt;/SPAN&gt;You can add the number of hours, minutes, and seconds after midnight of the prepended date for the following date formats:&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;m/d/y&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;d/m/y&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;y/m/d&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;ddMonyyyy&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;Monddyyyy&lt;/DIV&gt;&lt;DIV class="N2bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;– &lt;/SPAN&gt;&lt;/SPAN&gt;Locale Date&lt;/DIV&gt;&lt;DIV class="indent1"&gt;For example, December 31, 2004 has a numeric value of 3,187,296,600, which represents 12/31/2004 12:10 AM.&lt;/DIV&gt;&lt;DIV class="N1bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;• &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="command"&gt;:day:hr:m&lt;/SPAN&gt; and &lt;SPAN class="command"&gt;:day:hr:m:s &lt;/SPAN&gt;show the number of days, hours, minutes, and seconds since &lt;SPAN class="Emphasis"&gt;January 1, 1904&lt;/SPAN&gt;. For example, the results for December 31, 2004 are :36890:00:10: and :36890:00:10:00.&lt;/DIV&gt;&lt;DIV class="N1bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;• &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="command"&gt;h:m:s&lt;/SPAN&gt; and &lt;SPAN class="command"&gt;h:m &lt;/SPAN&gt;show the hours, minutes, and seconds portion of the date in the date field. For example, the results for December 31, 2004 at 12:10 AM are 12:10:00 AM and 12:10 AM.&lt;/DIV&gt;&lt;DIV class="N1bullet"&gt;&lt;SPAN class="WebWorks_Number"&gt;&lt;SPAN&gt;• &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="command"&gt;yyyy-mm-ddThh:mm&lt;/SPAN&gt; and &lt;SPAN class="command"&gt;yyyy-mm-ddThh:mm:ss &lt;/SPAN&gt;show the year, month, day, and time. For example, 2004-12-31T12:10:00. T is a literal value, representing itself.&lt;/DIV&gt;</description>
      <pubDate>Tue, 28 Nov 2017 13:20:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-formatting-in-Number-Edit-Box/m-p/47759#M27202</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2017-11-28T13:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Date formatting in Number Edit Box</title>
      <link>https://community.jmp.com/t5/Discussions/Date-formatting-in-Number-Edit-Box/m-p/47763#M27206</link>
      <description>Thanks this solved my issue completely!&lt;BR /&gt;I thought the SQL query would be unable to deal with the T but had no impact.</description>
      <pubDate>Tue, 28 Nov 2017 13:59:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-formatting-in-Number-Edit-Box/m-p/47763#M27206</guid>
      <dc:creator>itsalkskeith</dc:creator>
      <dc:date>2017-11-28T13:59:55Z</dc:date>
    </item>
  </channel>
</rss>

