<?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: Create a date time panel to extract SQL data in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18064#M16466</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using JMP 11, which do not have Query Builder functionality. Hope to get one later if our department agree for a upgrade. Anyway, Thanks for the guidance.&amp;nbsp;&amp;nbsp; I tried the script Ian from Vince posted and the date time window function works.&amp;nbsp; However, as I tried to glue with the button box that I designed to extract data table from sql server, it fail to have any response. I checked the sql statement with the original jsl scipt that I used to extract sql data table and it works fine. I am guessing somewhere wrong with the script that designed for button box to pull sql data table. Can any one take a quick fix?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;NamesDefaultToHere(1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Written by Vince Faller&lt;/P&gt;&lt;P&gt;// Makes a calendar come up on a numeditbox (defaults to now)&lt;/P&gt;&lt;P&gt;// Note, this only works on JMP 11 or above&lt;/P&gt;&lt;P&gt;dateBox = Function( &lt;/P&gt;&lt;P&gt; {timething = Today()},&lt;/P&gt;&lt;P&gt; {newbox},&lt;/P&gt;&lt;P&gt; newbox = Eval(&lt;/P&gt;&lt;P&gt; Substitute(&lt;/P&gt;&lt;P&gt; Name Expr(&lt;/P&gt;&lt;P&gt; Number Edit Box(&lt;/P&gt;&lt;P&gt; timething,&amp;nbsp; // Eval(Sub()) because of JMP quirk&lt;/P&gt;&lt;P&gt; 10,&amp;nbsp; // Just need this because JMP doesn't default a width&lt;/P&gt;&lt;P&gt; &amp;lt;&amp;lt;Set function(&lt;/P&gt;&lt;P&gt; Function( {self},&lt;/P&gt;&lt;P&gt; {},&lt;/P&gt;&lt;P&gt; If( Is Missing( self &amp;lt;&amp;lt; get ),&lt;/P&gt;&lt;P&gt; self &amp;lt;&amp;lt; Set( Eval( DUMMY ) ) // Sets the date to the timething argument&lt;/P&gt;&lt;P&gt; )&lt;/P&gt;&lt;P&gt; )&lt;/P&gt;&lt;P&gt; ),&lt;/P&gt;&lt;P&gt; &amp;lt;&amp;lt; Set Format( Format( "m/d/y h:m:s", 23, 0 ) ); // Makes datetime format for the box (gives calendar)&lt;/P&gt;&lt;P&gt; )&lt;/P&gt;&lt;P&gt; ),&lt;/P&gt;&lt;P&gt; Expr( DUMMY ), timething&lt;/P&gt;&lt;P&gt; )&lt;/P&gt;&lt;P&gt; );&lt;/P&gt;&lt;P&gt; newbox;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nw = &lt;/P&gt;&lt;P&gt;New Window( "SQL Data Table Extraction",&amp;lt;&amp;lt;modal,&lt;/P&gt;&lt;P&gt; LineUpBox(NCol(2),&lt;/P&gt;&lt;P&gt; TextBox("Start DateTime"), start = dateBox(Today() - InHours(12)),&lt;/P&gt;&lt;P&gt; TextBox("End DateTime"), end = dateBox(),&lt;/P&gt;&lt;P&gt; ButtonBox("Cancel", nw &amp;lt;&amp;lt; closeEindow), ButtonBox("Get Data", RunScript)&lt;/P&gt;&lt;P&gt; ));&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;sql_statement = evalinsert("SELECT * FROM dbo.TESTCOMPLETEWHERE dCreated &amp;gt;= '^startDT^' AND dCreated &amp;lt;= '^endDT^'ORDER BY dCreated");&lt;/P&gt;&lt;P&gt;RunScript= Expr(nw&amp;lt;&amp;lt;Cloased Window;&lt;/P&gt;&lt;P&gt;&amp;nbsp; startDT = start &amp;lt;&amp;lt; get;&lt;/P&gt;&lt;P&gt;&amp;nbsp; endDT = end &amp;lt;&amp;lt; get;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Open Database(&lt;/P&gt;&lt;P&gt;&amp;nbsp; "DSN=;Description=;UID=;PWD=;APP=;WSID=1",&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_statement,&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Test Result"));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Apr 2016 18:12:56 GMT</pubDate>
    <dc:creator>bernie426</dc:creator>
    <dc:date>2016-04-15T18:12:56Z</dc:date>
    <item>
      <title>Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18060#M16462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used to use a jmp script to extract sql data table. This day I tried to built a window panel box to execute the same sql data table function. &lt;/P&gt;&lt;P&gt;The simple idea is to extract sql data table within a period of time, which would be two input variables in the panel box. The "End_Time" can easily use Today() syntax. However, for "Start_Time", I tried to write a script that allow user to input a certain "hour "before End_time that he want to pull the data table. &lt;/P&gt;&lt;P&gt;Unfortunately, this script is not working as expected. &lt;/P&gt;&lt;P&gt;Can any jmp script guru try to correct my script below? I also attached the jmp script I wrote for modification. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14607004709467464" jivemacro_uid="_14607004709467464" modifiedtitle="true"&gt;&lt;P&gt;nw = new window("SQL Data Table Extraction",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Vlistbox(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tb1=textbox("Start_Time: "),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dteb1 = numbereditbox(1),&lt;/P&gt;&lt;P&gt;&amp;nbsp; hlistbox(&lt;/P&gt;&lt;P&gt;&amp;nbsp; text box("Enter the number of hours: "),&lt;/P&gt;&lt;P&gt;&amp;nbsp; hours_teb = text edit box()),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tb2=textbox("End_Time: "),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dteb2 = numbereditbox(1),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ok_button = button box("Get Data", &amp;lt;&amp;lt; Open Database("DSN=;Description=;UID=;PWD=;APP=;WSID=", sql_statement, Test Data)),&lt;/P&gt;&lt;P&gt;dteb1 &amp;lt;&amp;lt; set format(format("m/d/y h:m:s", 23, 0)),&lt;/P&gt;&lt;P&gt;dteb1 &amp;lt;&amp;lt; set width(23),&lt;/P&gt;&lt;P&gt;dteb1 &amp;lt;&amp;lt; set(today()-EvalExpr((hours_tab)*60*60)),&lt;/P&gt;&lt;P&gt;dteb2 &amp;lt;&amp;lt; set format(format("m/d/y h:m:s", 23, 0)),&lt;/P&gt;&lt;P&gt;dteb2 &amp;lt;&amp;lt; set(Today()));&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_statement="SELECT * FROM dbo.TESTCOMPLETE WHERE (dCreated &amp;gt;= '"||Start Date/Time||"') AND (dCreated &amp;lt;='"||End_Date/Time||"')");&lt;IMG __jive_macro_name="toc" class="jive_macro_toc jive_macro" src="https://community.jmp.com/7.0.4.3b79b96/images/tiny_mce3/plugins/jiveemoticons/images/spacer.gif" /&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2016 06:20:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18060#M16462</guid>
      <dc:creator>bernie426</dc:creator>
      <dc:date>2016-04-15T06:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18061#M16463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In terms of selecting date times you might like to look at &lt;A _jive_internal="true" href="https://community.jmp.com/thread/65918"&gt;this thread&lt;/A&gt; too. So using the code &lt;SPAN style="font-size: 10pt;"&gt;kindly &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;written by &lt;A _jive_internal="true" href="https://community.jmp.com/people/vince.faller0"&gt;Vince Feller &lt;/A&gt;​you might like to try this kind of approach since it gives a lot more functionality:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;NamesDefaultToHere&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; min-height: 14px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #008f00;"&gt;// Written by Vince Faller&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #008f00;"&gt;// Makes a calendar come up on a numeditbox (defaults to now)&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #008f00;"&gt;// Note, this only works on JMP 11 or above&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;dateBox &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Function&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;timething &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Today&lt;/SPAN&gt;&lt;STRONG&gt;()}&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;newbox&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;newbox &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;Eval&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;Substitute&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;Name Expr&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;Number Edit Box&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;timething&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;// Eval(Sub()) because of JMP quirk&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;10&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;// Just need this because JMP doesn't default a width&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #011993;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;Set function&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Function&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;STRONG&gt;{&lt;/STRONG&gt;self&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;{}&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;If&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #032ce4;"&gt;Is Missing&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; self &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;get&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;self &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;Set&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Eval&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; DUMMY &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;// Sets the date to the timething argument&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #008f00;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;Set Format&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Format&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #942193;"&gt;"m/d/y h:m:s"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;23&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;// Makes datetime format for the box (gives calendar)&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Expr&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; DUMMY &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; timething&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;newbox&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; min-height: 14px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;nw &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #032ce4;"&gt;New Window&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/SPAN&gt;"Date Time Span "&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;LineUpBox&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;NCol&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;TextBox&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"Start DateTime"&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; start &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; dateBox&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #032ce4;"&gt;Today&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt; &lt;SPAN style="color: #011993;"&gt;-&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;InHours&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #009193;"&gt;&lt;STRONG&gt;12&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;TextBox&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"End DateTime"&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; end &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; dateBox&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;ButtonBox&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"Cancel"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; nw &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;closeEindow&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: #032ce4;"&gt;ButtonBox&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #942193;"&gt;"OK"&lt;/SPAN&gt;&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; runScript&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; min-height: 14px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;runScript &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;Expr&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier; color: #011993;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;nw &lt;/SPAN&gt;&amp;lt;&amp;lt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;CloseWindow&lt;/STRONG&gt;;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;startDT &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; start &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;get&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;endDT &lt;SPAN style="color: #011993;"&gt;=&lt;/SPAN&gt; end &lt;SPAN style="color: #011993;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN style="color: #011993;"&gt;&lt;STRONG&gt;get&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Print&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;startDT&lt;SPAN style="color: #011993;"&gt;,&lt;/SPAN&gt; endDT&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 12px; line-height: normal; font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #011993;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I didn't &lt;/SPAN&gt;check out your original code in detail, but I did see that you were attempting to have a variable name containing '/', which isn't allowed unless you also use 'Name()'. Look at 'Help &amp;gt; Books &amp;gt; Scripting Guide' for more details on what you can and can't do.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2016 09:38:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18061#M16463</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2016-04-15T09:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18062#M16464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey, bernie426,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are on JMP 12, consider using Query Builder for these sorts of things (and if you're not at JMP 12 yet, try to get there ;-).&amp;nbsp; Query Builder lets you interactively create filtered SQL queries, and you can turn those filters into prompts.&amp;nbsp; A primary reason Query Builder was created was for situations just like yours.&amp;nbsp; Here is what the query looks like while being built:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11353_qb_date_range_filter.png" style="width: 1029px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/2962i54876DAB96E54446/image-size/medium?v=v2&amp;amp;px=400" role="button" title="11353_qb_date_range_filter.png" alt="11353_qb_date_range_filter.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you look closely you can see &lt;STRONG&gt;(Prompt)&lt;/STRONG&gt;​ next to the filter.&amp;nbsp; Then, when the query is run, you get a prompt that will automatically present a date picker or date-time picker, depending on the format of the variable:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11354_date_filter_run_query.png" style="width: 633px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/2963i5A3A6C291136BAB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="11354_date_filter_run_query.png" alt="11354_date_filter_run_query.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something to think about, for the future if not right away.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 02:25:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18062#M16464</guid>
      <dc:creator>Eric_Hill</dc:creator>
      <dc:date>2016-10-19T02:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18063#M16465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Much better, Eric! Avoiding JSL is never a bad strategy &lt;SPAN __jive_emoticon_name="wink" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_emote jive_macro" src="https://community.jmp.com/7.0.4.3b79b96/images/emoticons/wink.png"&gt;&lt;/SPAN&gt;. Sorry to overlook this option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2016 12:44:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18063#M16465</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2016-04-15T12:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18064#M16466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using JMP 11, which do not have Query Builder functionality. Hope to get one later if our department agree for a upgrade. Anyway, Thanks for the guidance.&amp;nbsp;&amp;nbsp; I tried the script Ian from Vince posted and the date time window function works.&amp;nbsp; However, as I tried to glue with the button box that I designed to extract data table from sql server, it fail to have any response. I checked the sql statement with the original jsl scipt that I used to extract sql data table and it works fine. I am guessing somewhere wrong with the script that designed for button box to pull sql data table. Can any one take a quick fix?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;NamesDefaultToHere(1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Written by Vince Faller&lt;/P&gt;&lt;P&gt;// Makes a calendar come up on a numeditbox (defaults to now)&lt;/P&gt;&lt;P&gt;// Note, this only works on JMP 11 or above&lt;/P&gt;&lt;P&gt;dateBox = Function( &lt;/P&gt;&lt;P&gt; {timething = Today()},&lt;/P&gt;&lt;P&gt; {newbox},&lt;/P&gt;&lt;P&gt; newbox = Eval(&lt;/P&gt;&lt;P&gt; Substitute(&lt;/P&gt;&lt;P&gt; Name Expr(&lt;/P&gt;&lt;P&gt; Number Edit Box(&lt;/P&gt;&lt;P&gt; timething,&amp;nbsp; // Eval(Sub()) because of JMP quirk&lt;/P&gt;&lt;P&gt; 10,&amp;nbsp; // Just need this because JMP doesn't default a width&lt;/P&gt;&lt;P&gt; &amp;lt;&amp;lt;Set function(&lt;/P&gt;&lt;P&gt; Function( {self},&lt;/P&gt;&lt;P&gt; {},&lt;/P&gt;&lt;P&gt; If( Is Missing( self &amp;lt;&amp;lt; get ),&lt;/P&gt;&lt;P&gt; self &amp;lt;&amp;lt; Set( Eval( DUMMY ) ) // Sets the date to the timething argument&lt;/P&gt;&lt;P&gt; )&lt;/P&gt;&lt;P&gt; )&lt;/P&gt;&lt;P&gt; ),&lt;/P&gt;&lt;P&gt; &amp;lt;&amp;lt; Set Format( Format( "m/d/y h:m:s", 23, 0 ) ); // Makes datetime format for the box (gives calendar)&lt;/P&gt;&lt;P&gt; )&lt;/P&gt;&lt;P&gt; ),&lt;/P&gt;&lt;P&gt; Expr( DUMMY ), timething&lt;/P&gt;&lt;P&gt; )&lt;/P&gt;&lt;P&gt; );&lt;/P&gt;&lt;P&gt; newbox;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nw = &lt;/P&gt;&lt;P&gt;New Window( "SQL Data Table Extraction",&amp;lt;&amp;lt;modal,&lt;/P&gt;&lt;P&gt; LineUpBox(NCol(2),&lt;/P&gt;&lt;P&gt; TextBox("Start DateTime"), start = dateBox(Today() - InHours(12)),&lt;/P&gt;&lt;P&gt; TextBox("End DateTime"), end = dateBox(),&lt;/P&gt;&lt;P&gt; ButtonBox("Cancel", nw &amp;lt;&amp;lt; closeEindow), ButtonBox("Get Data", RunScript)&lt;/P&gt;&lt;P&gt; ));&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;sql_statement = evalinsert("SELECT * FROM dbo.TESTCOMPLETEWHERE dCreated &amp;gt;= '^startDT^' AND dCreated &amp;lt;= '^endDT^'ORDER BY dCreated");&lt;/P&gt;&lt;P&gt;RunScript= Expr(nw&amp;lt;&amp;lt;Cloased Window;&lt;/P&gt;&lt;P&gt;&amp;nbsp; startDT = start &amp;lt;&amp;lt; get;&lt;/P&gt;&lt;P&gt;&amp;nbsp; endDT = end &amp;lt;&amp;lt; get;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Open Database(&lt;/P&gt;&lt;P&gt;&amp;nbsp; "DSN=;Description=;UID=;PWD=;APP=;WSID=1",&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_statement,&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Test Result"));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2016 18:12:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18064#M16466</guid>
      <dc:creator>bernie426</dc:creator>
      <dc:date>2016-04-15T18:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18065#M16467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nw &amp;lt;&amp;lt; Cloased Window&lt;/P&gt;&lt;P&gt;will crash the script.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you need to &lt;/P&gt;&lt;P&gt;nw&amp;lt;&amp;lt;close window&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;also you have another spelling error in your cancel button.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you should also use MDYHMS(startDT) and endDT, or some other conversion to SQL DateTime because JMP will just report a number and SQL won't take this as a date time.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2016 15:15:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18065#M16467</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2016-04-20T15:15:24Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18066#M16468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vince,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply. I recognized the spelling error days before, but still cannot get my script working as expected.&lt;/P&gt;&lt;P&gt;In your response, do you mean I cannot use the &lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Number Edit Box() script function that you used to wrote for date box()?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Is this the issue that I am receiving the following warning message (Please see the image below) when I clicked on the "Get Data" button?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;However how come if I directly run the script below, jmp is able to pull the request data table from sql server?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="xml" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14611970824369762 jive_text_macro" jivemacro_uid="_14611970824369762" modifiedtitle="true"&gt;&lt;P&gt;//This script is wrote to pull data within a certain time frame&lt;/P&gt;&lt;P&gt;start_time="04/11/2016 7:00:00 AM";&lt;/P&gt;&lt;P&gt;end_time="04/12/2016 7:00:00 PM";&lt;/P&gt;&lt;P&gt;sql_statement=evalinsert("SELECT * FROM dbo.TESTCOMPLETEWHERE dCreated &amp;gt;= '^start_time^' AND dCreated &amp;lt;= '^end_time^' ORDER BY dCreated");&lt;/P&gt;&lt;P&gt;Open Database(&lt;/P&gt;&lt;P&gt;&amp;nbsp; "DSN=;Description=;UID=;PWD=;APP=;WSID=",sql_statement,&lt;/P&gt;&lt;P&gt;&amp;nbsp; "Test Data");&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="11380_pastedImage_7.png" style="width: 1037px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/2974i10BF4D24E796126F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="11380_pastedImage_7.png" alt="11380_pastedImage_7.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Oct 2016 02:27:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18066#M16468</guid>
      <dc:creator>bernie426</dc:creator>
      <dc:date>2016-10-19T02:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18067#M16469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i am using the folwing script to exract SQL data table and limit the time in modal&lt;/P&gt;&lt;P&gt;::dbc&amp;nbsp; = my name and login that i insert in different add in, you can use open data base instead&lt;/P&gt;&lt;P&gt;i added botton for 2 diffrent tables (defect and yield)&lt;/P&gt;&lt;P&gt;another filter for paramter (defect type, yield paramter etc.)&lt;/P&gt;&lt;P&gt;my SQL time column is 'dayxxx'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;win &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;New Window&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #800080; font-size: 10pt;"&gt;"select data"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; Modal,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Panel Box&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"Select"&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;rbox &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;Radio Box&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;( &lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"DEFECT"&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"YIELD"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;} &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;,&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;Text Box&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"PARAMETER"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;variablebox1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;Text Edit Box&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;,&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;Text Box&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"Insert days"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;variablebox2 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;Text Edit Box&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;)&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;area1 &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; rbox &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;get&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;PARAM &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; variablebox1 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;get text &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Days &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; variablebox2 &lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;get text &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;table1 &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;if&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;area1 &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"defect tablexxx"&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;area1 &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;2&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #800080; font-size: 10pt;"&gt;"yield tablexxx"&lt;/SPAN&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;&amp;nbsp; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/// SQL data selsction ///&lt;/P&gt;&lt;P&gt;dt &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000dd; font-size: 10pt; font-family: Courier New;"&gt;Execute SQL&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;::&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;dbc&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"SELECT * FROM \!"pathxxx\!".\!""&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;table1&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #800080; font-size: 10pt;"&gt;"\!"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;WHERE \!"dayxxx\!" &amp;gt; (CURRENT_DATE - "&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;Days&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #800080; font-size: 10pt;"&gt;" DAYS)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AND \!"parameterxxx\!" = '"&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;PARAM&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #800080; font-size: 10pt;"&gt;"'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;)&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;dt &lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; Set Name&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;PARAM&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;" "&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;days&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG style="font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Courier New; color: #000080; font-size: 10pt;"&gt;*i did alot of modifcation to hide my company data base name so i might made some script erros&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 13:38:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18067#M16469</guid>
      <dc:creator>guy_yosef</dc:creator>
      <dc:date>2016-04-21T13:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18068#M16470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you run start &amp;lt;&amp;lt; Get (or just mouse over startDT).&amp;nbsp; You'll see that the value is actually just some number, 3543202800 for "04/11/2016 7:00:00 AM".&amp;nbsp; So when you try putting it in SQL, you're actually just giving it that number (which is not character so you can't concatenate it in).&amp;nbsp; You need to change&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;startDT = start &amp;lt;&amp;lt; get;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&amp;nbsp; endDT = end &amp;lt;&amp;lt; get;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;to &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;startDT = MDYHMS(start &amp;lt;&amp;lt; get);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&amp;nbsp; endDT = MDYHMS(end &amp;lt;&amp;lt; get);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;I think this should let you run.&amp;nbsp; &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #555555;"&gt;As far as your error, it just looks like there's no ; after your line 43&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 16:32:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18068#M16470</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2016-04-21T16:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18069#M16471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vince, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for guiding through my blind points and getting me closer. However, even after changing &lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;SPAN style="color: #555555; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;startDT = MDYHMS(start&amp;lt;&amp;lt; get) format I still cannot get this sql script working. Then, I am still receiving the same jmp warning message "Name Unresolved:Runscript in scces or evaluation of 'RunScirpt, RunScript/*###*/". Is there anything wrong in my script?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #555555; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I also attached my script for checking. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14612706830748516 jive_text_macro" jivemacro_uid="_14612706830748516" modifiedtitle="true"&gt;&lt;P&gt;NamesDefaultToHere(1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Written by Vince Faller&lt;/P&gt;&lt;P&gt;// Makes a calendar come up on a numeditbox (defaults to now)&lt;/P&gt;&lt;P&gt;// Note, this only works on JMP 11 or above&lt;/P&gt;&lt;P&gt;dateBox = Function(&lt;/P&gt;&lt;P&gt;{timething = Today()},&lt;/P&gt;&lt;P&gt;{newbox},&lt;/P&gt;&lt;P&gt;newbox = Eval(&lt;/P&gt;&lt;P&gt;Substitute(&lt;/P&gt;&lt;P&gt;Name Expr(&lt;/P&gt;&lt;P&gt;Number Edit Box(&lt;/P&gt;&lt;P&gt;timething,&amp;nbsp; // Eval(Sub()) because of JMP quirk&lt;/P&gt;&lt;P&gt;10,&amp;nbsp; // Just need this because JMP doesn't default a width&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt;Set function(&lt;/P&gt;&lt;P&gt;Function( {self},&lt;/P&gt;&lt;P&gt;{},&lt;/P&gt;&lt;P&gt;If( Is Missing( self &amp;lt;&amp;lt; get ),&lt;/P&gt;&lt;P&gt;self &amp;lt;&amp;lt; Set( Eval( DUMMY ) ) // Sets the date to the timething argument&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;),&lt;/P&gt;&lt;P&gt;&amp;lt;&amp;lt; Set Format( Format( "m/d/y h:m:s", 23, 0 ) ); // Makes datetime format for the box (gives calendar)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;),&lt;/P&gt;&lt;P&gt;Expr( DUMMY ), timething&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;newbox;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nw =&lt;/P&gt;&lt;P&gt;New Window( "SQL Data Table Extraction",&lt;/P&gt;&lt;P&gt;LineUpBox(NCol(2),&lt;/P&gt;&lt;P&gt;TextBox("Start DateTime"), start = dateBox(Today() - InDays(12)),&lt;/P&gt;&lt;P&gt;TextBox("End DateTime"), end = dateBox(),&lt;/P&gt;&lt;P&gt;ButtonBox("Cancel", nw &amp;lt;&amp;lt; close window), ButtonBox("Get Data", RunScript)&lt;/P&gt;&lt;P&gt;));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sql_statement=evalinsert("SELECT * FROM dbo.TESTCOMPLETE WHERE dCreated &amp;gt;= '^start_time^' AND dCreated &amp;lt;= '^end_time^' ORDER BY dCreated");&lt;/P&gt;&lt;P&gt;RunScript= Expr(nw&amp;lt;&amp;lt;Close Window;&lt;/P&gt;&lt;P&gt;&amp;nbsp; startDT=MDYHMS(start &amp;lt;&amp;lt; get);&lt;/P&gt;&lt;P&gt;&amp;nbsp; endDT=MDYHMS(end&amp;lt;&amp;lt;get);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Open Database(&lt;/P&gt;&lt;P&gt;&amp;nbsp; "DSN=;Description=;UID=;PWD=;APP=;WSID=",&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_statement,"Test Result"));&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:38:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18069#M16471</guid>
      <dc:creator>bernie426</dc:creator>
      <dc:date>2016-04-21T20:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18070#M16472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for sharing....&lt;A href="https://community.jmp.com/people/guy.yosef"&gt;guy.yosef&lt;/A&gt;​&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:39:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18070#M16472</guid>
      <dc:creator>bernie426</dc:creator>
      <dc:date>2016-04-21T20:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18071#M16473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TWo things&lt;/P&gt;&lt;OL class="dp-sql" start="1" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;sql_statement=evalinsert(&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"SELECT * FROM dbo.TESTCOMPLETE WHERE dCreated &amp;gt;= '^start_time^' AND dCreated &amp;lt;= '^end_time^' ORDER BY dCreated"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; font-style: inherit;"&gt;These are not the same variables as startDT and EndDT&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; font-style: inherit;"&gt; sql_statement should be inside of RunScript&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; font-style: inherit;"&gt;if I make the last couple lines look like this it prints fine&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;nw =&lt;/P&gt;&lt;P&gt;New Window( "SQL Data Table Extraction",&lt;/P&gt;&lt;P&gt;LineUpBox(NCol(2),&lt;/P&gt;&lt;P&gt;TextBox("Start DateTime"), start = dateBox(Today() - InDays(12)),&lt;/P&gt;&lt;P&gt;TextBox("End DateTime"), end = dateBox(),&lt;/P&gt;&lt;P&gt;ButtonBox("Cancel", nw &amp;lt;&amp;lt; close Window), ButtonBox("Get Data", RunScript)&lt;/P&gt;&lt;P&gt;));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RunScript= Expr(nw&amp;lt;&amp;lt;Close Window;&lt;/P&gt;&lt;P&gt;&amp;nbsp; startDT=MDYHMS(start &amp;lt;&amp;lt; get);&lt;/P&gt;&lt;P&gt;&amp;nbsp; endDT=MDYHMS(end&amp;lt;&amp;lt;get);&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_statement="SELECT * FROM dbo.TESTCOMPLETE WHERE dCreated &amp;gt;= '"||startDT||"' AND dCreated &amp;lt;= '"||endDT||"' ORDER BY dCreated";&lt;/P&gt;&lt;P&gt;&amp;nbsp; print(sql_statement);&lt;/P&gt;&lt;P&gt; );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 21:16:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18071#M16473</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2016-04-21T21:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create a date time panel to extract SQL data</title>
      <link>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18072#M16474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vince,&lt;/P&gt;&lt;P&gt;Thanks for the guidance and patience.&amp;nbsp; Finally I got it work out. &lt;/P&gt;&lt;P&gt;Underneath one is the correct and working version.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL class="dp-sql" start="1" style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #5c5c5c; margin: 0 0 1px 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; font-style: inherit;"&gt;NamesDefaultToHere(1);&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;// Written &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Vince Faller&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;// Makes a calendar come up &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;on&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; a numeditbox (defaults &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; now)&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;// Note, this &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;only&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; works &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;on&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; JMP 11 &lt;/SPAN&gt;&lt;SPAN class="op" style="font-weight: inherit; font-style: inherit; color: #808080; font-size: 9pt !important; background-color: inherit;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; above&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;dateBox = &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;Function&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;(&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;{timething = Today()},&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;{newbox},&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;newbox = Eval(&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;Substitute(&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Expr(&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;Number Edit Box(&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;timething,&amp;nbsp; // Eval(Sub()) because &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;of&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; JMP quirk&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;10,&amp;nbsp; // Just need this because JMP doesn't &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;default&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; a width&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&amp;lt;&amp;lt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;Set&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;(&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;Function&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;( {self},&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;{},&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;If( &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;Is&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Missing( self &amp;lt;&amp;lt; get ),&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;self &amp;lt;&amp;lt; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;Set&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;( Eval( DUMMY ) ) // Sets the &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;date&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; the timething argument&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;),&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&amp;lt;&amp;lt; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;Set&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Format( Format( &lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"m/d/y h:m:s"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;, 23, 0 ) ); // Makes datetime format &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; the box (gives calendar)&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;),&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;Expr( DUMMY ), timething&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;newbox;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;);&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;nw =&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;New Window( &lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"SQL Data Table Extraction"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;,&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;LineUpBox(NCol(2),&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;TextBox(&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"Start DateTime"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;), start = dateBox(Today() - InDays(12)),&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;TextBox(&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"End DateTime"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;), &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; = dateBox(),&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;ButtonBox(&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"Cancel"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;, nw &amp;lt;&amp;lt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;close&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; window), ButtonBox(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"Get Data"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;, RunScript)&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;));&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; font-style: inherit; font-weight: inherit; color: black; font-family: Consolas, 'Courier New', Courier, mono, serif; line-height: 1.5em;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;RunScript= Expr(nw&amp;lt;&amp;lt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;Close&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; Window;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; font-style: inherit;"&gt;&amp;nbsp; &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;sql_statement=evalinsert(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-family: Consolas, 'Courier New', Courier, mono, serif; font-style: inherit; font-weight: inherit; color: blue; font-size: 9pt !important;"&gt;"SELECT * FROM dbo.TESTCOMPLETE WHERE dCreated &amp;gt;= '^&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;startDT&lt;/SPAN&gt;^' AND dCreated &amp;lt;= '^&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;endDT&lt;/SPAN&gt;^' ORDER BY dCreated"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-style: inherit; font-weight: inherit; font-size: 9pt !important;"&gt;);&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&amp;nbsp; startDT=MDYHMS(start &amp;lt;&amp;lt; get);&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&amp;nbsp; endDT=MDYHMS(&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;lt;&amp;lt;get);&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;Database&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;(&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&amp;nbsp; &lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"DSN=;Description=;UID=;PWD=;APP=;WSID="&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;,&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; font-family: Consolas, 'Courier New', Courier, mono, serif !important; color: black; background-color: inherit;"&gt;&amp;nbsp; sql_statement,&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;"Test Result"&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;)); &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 22:11:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-a-date-time-panel-to-extract-SQL-data/m-p/18072#M16474</guid>
      <dc:creator>bernie426</dc:creator>
      <dc:date>2016-04-21T22:11:43Z</dc:date>
    </item>
  </channel>
</rss>

