<?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: Calendar Box Question in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Calendar-Box-Question/m-p/530302#M75346</link>
    <description>&lt;P&gt;You can just subtract off the seconds since midnight.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;sdate = Today();

Show( Format( sdate, "m/d/y h:m" ) );

sdate -= Modulo( sdate, In Days( 1 ) );

Show( Format( sdate, "m/d/y h:m" ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 04 Aug 2022 13:16:07 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2022-08-04T13:16:07Z</dc:date>
    <item>
      <title>Calendar Box Question</title>
      <link>https://community.jmp.com/t5/Discussions/Calendar-Box-Question/m-p/530043#M75327</link>
      <description>&lt;P&gt;&lt;SPAN&gt;When using the calendar box to allow users to select a single date, is there a way to set the time to 12:00:00AM of the date selected? I ask because with the code I'm using below, each time I select a given date (e.g., August 1, 2022) I get a slightly different value depending on the time of day when the code was run. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Ultimately, I'm using the calendar box to select a given date and to then select rows in a data table where sdate == Date and which is derived from a formula (Date MDY( :Month, :Day, :Year ).&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw = New Window( "Instrument Linearity Test Date",
	&amp;lt;&amp;lt;modal(),
	Text Box( "Select Date of Linearity Test" ),
	Panel Box( "Date", cal_start = Calendar Box( &amp;lt;&amp;lt;Show Time( 0 ) ), ),
	ok_button = Button Box( "OK", sdate = cal_start &amp;lt;&amp;lt; get date )
);

Show( sdate );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:06:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calendar-Box-Question/m-p/530043#M75327</guid>
      <dc:creator>terapin</dc:creator>
      <dc:date>2023-06-09T17:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Box Question</title>
      <link>https://community.jmp.com/t5/Discussions/Calendar-Box-Question/m-p/530063#M75329</link>
      <description>&lt;P&gt;Take a look at &lt;LI-MESSAGE title="Select Date Range with Calendar Boxes" uid="222980" url="https://community.jmp.com/t5/Uncharted/Select-Date-Range-with-Calendar-Boxes/m-p/222980#U222980" 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; . See if the "roundMidnight" function and the OnClose for the modal dialog will do what you need.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4587"&gt;@danschikore&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 00:25:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calendar-Box-Question/m-p/530063#M75329</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2022-08-04T00:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Box Question</title>
      <link>https://community.jmp.com/t5/Discussions/Calendar-Box-Question/m-p/530302#M75346</link>
      <description>&lt;P&gt;You can just subtract off the seconds since midnight.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;sdate = Today();

Show( Format( sdate, "m/d/y h:m" ) );

sdate -= Modulo( sdate, In Days( 1 ) );

Show( Format( sdate, "m/d/y h:m" ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Aug 2022 13:16:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calendar-Box-Question/m-p/530302#M75346</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2022-08-04T13:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Box Question</title>
      <link>https://community.jmp.com/t5/Discussions/Calendar-Box-Question/m-p/530405#M75357</link>
      <description>&lt;P&gt;Here's a way to take the time off of the date:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw = New Window( "Instrument Linearity Test Date",
	&amp;lt;&amp;lt;modal(),
	Text Box( "Select Date of Linearity Test" ),
	Panel Box( "Date", cal_start = Calendar Box( &amp;lt;&amp;lt;Show Time( 0 ) ), ),
	ok_button = Button Box( "OK", sdate = cal_start &amp;lt;&amp;lt; get date )
);

Show( sdate );

trunc_dt = informat(format(sdate, "ddMonyyyy"), "ddMonyyyy");

show(trunc_dt);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Aug 2022 14:48:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calendar-Box-Question/m-p/530405#M75357</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2022-08-04T14:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calendar Box Question</title>
      <link>https://community.jmp.com/t5/Discussions/Calendar-Box-Question/m-p/530573#M75378</link>
      <description>&lt;P&gt;Dang, I got a hat trick of outstanding suggestions from some heavy hitters.&amp;nbsp; Thanks fellas for weighing in on this and offering some helpful and informative suggestions.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 19:12:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Calendar-Box-Question/m-p/530573#M75378</guid>
      <dc:creator>terapin</dc:creator>
      <dc:date>2022-08-04T19:12:02Z</dc:date>
    </item>
  </channel>
</rss>

