<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Date time query in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Date-time-query/m-p/657171#M84620</link>
    <description>&lt;P&gt;Yes, I need the date today but not hardcoded that's why I tried using&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;i = As Date( Today() );
dateToday = MDYHMS(i);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;But the time it gives is only the time it run, not from 00:00:00 AM - 11:59:59 PM&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jul 2023 23:19:28 GMT</pubDate>
    <dc:creator>UserID16644</dc:creator>
    <dc:date>2023-07-10T23:19:28Z</dc:date>
    <item>
      <title>Date time query</title>
      <link>https://community.jmp.com/t5/Discussions/Date-time-query/m-p/656826#M84584</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to make a script where I need to query data for the whole day. I have this sample code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open Database( Username=username ;Password=password0;APP=JMP;DATABASE=db01;", 
"select *
from  table
where  date_time between '07/10/2023 00:00:00 AM' and '07/10/2023 11:59:00 PM'" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there a way I can put 07/10/2023 00:00:00 AM and&amp;nbsp;07/10/2023 11:59:00 PM in a variable?&lt;/P&gt;&lt;P&gt;I tried using this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;i = As Date( Today() );&lt;BR /&gt;dateToday = MDYHMS(i);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it is only showing the hour it was run. Please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 08:38:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-time-query/m-p/656826#M84584</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2023-07-10T08:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: Date time query</title>
      <link>https://community.jmp.com/t5/Discussions/Date-time-query/m-p/656831#M84585</link>
      <description>&lt;P&gt;Do you want to get the date based on todays date? If you just want to have string in a variable, you can just assign in&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;start_time = "07/10/2023 00:00:00 AM"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then concatenate it to sql query or maybe better would be to use Eval Insert&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 08:59:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-time-query/m-p/656831#M84585</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-07-10T08:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Date time query</title>
      <link>https://community.jmp.com/t5/Discussions/Date-time-query/m-p/657171#M84620</link>
      <description>&lt;P&gt;Yes, I need the date today but not hardcoded that's why I tried using&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;i = As Date( Today() );
dateToday = MDYHMS(i);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;But the time it gives is only the time it run, not from 00:00:00 AM - 11:59:59 PM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 23:19:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-time-query/m-p/657171#M84620</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2023-07-10T23:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: Date time query</title>
      <link>https://community.jmp.com/t5/Discussions/Date-time-query/m-p/657211#M84628</link>
      <description>&lt;P&gt;&lt;A href="https://www.jmp.com/support/help/en/17.1/index.shtml#page/jmp/date-and-time-functions.shtml" target="_self"&gt;Datetime values are handled internally as numbers of seconds since midnight, January 1, 1904.&lt;/A&gt;&amp;nbsp;So you can deduct and add some seconds as needed&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

now = As Date(Today());
start_time = MDYHMS(now - Time Of Day(now)); // "07.11.2023 0:00:00"
end_time = MDYHMS(now - Time Of Day(now) + In Days(1) - 1); // "07.11.2023 23:59:59"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 07:02:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Date-time-query/m-p/657211#M84628</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-07-11T07:02:19Z</dc:date>
    </item>
  </channel>
</rss>

