<?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: How to query a datatable on both date and time basis. in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525382#M19652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;Hello Nilesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;Thanks but it's not the solution of my problem.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;I need to display data only from 9 AM to 1 PM&amp;nbsp; for all days ranging from 1 september(minDate) to 13 september(maxDate).&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;The solution you have posted is filtering my data as 2016-09-01 09:00:00 to 2016-09-13 13:00:00&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;It is displaying all instances of data from 2 september to 12 september whether it is between 9 AM to 1 PM or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;For each day that falls in range I need to display data only for fix time interval, i.e. &lt;SPAN style="color: #4d4d4f; font-family: 'Source Sans Pro', sans-serif; font-size: 13px;"&gt;9 AM to 1 PM&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Sep 2016 16:14:20 GMT</pubDate>
    <dc:creator>magrawal</dc:creator>
    <dc:date>2016-09-14T16:14:20Z</dc:date>
    <item>
      <title>How to query a datatable on both date and time basis.</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525380#M19650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a use case where devices are sending data in JSON format to a broker server and from that broker server we are receiving data to data tables of thingworx through a service.&lt;/P&gt;&lt;P&gt;say we are receiving data for temperature, now I need to generate a time series graph that will display temperature data between the hours of 9 AM to 3 PM, also user will filter data by enter minimum date and maximum date.&lt;/P&gt;&lt;P&gt;So to display filtered data on graph I wrote the following service:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var query = {&lt;/P&gt;&lt;P&gt;&amp;nbsp; "filters": {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "fieldName": "timestamp",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type": "BETWEEN",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "from": minDate, // Input parameter for minimum date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "to": maxDate &lt;SPAN style="font-size: 13.3333px;"&gt;// Input parameter for maximum date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var values = me.CreateValues();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var params = {&lt;/P&gt;&lt;P&gt;&amp;nbsp; maxItems: 500 /* NUMBER */,&lt;/P&gt;&lt;P&gt;&amp;nbsp; values: &lt;STRONG&gt;values&lt;/STRONG&gt; /* INFOTABLE*/,&lt;/P&gt;&lt;P&gt;&amp;nbsp; query: &lt;STRONG&gt;query&lt;/STRONG&gt; /* QUERY */,&lt;/P&gt;&lt;P&gt;&amp;nbsp; source: undefined /* STRING */,&lt;/P&gt;&lt;P&gt;&amp;nbsp; tags: undefined /* TAGS */&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// result: INFOTABLE dataShape: "undefined"&lt;/P&gt;&lt;P&gt;var result = me.QueryDataTableEntries(params);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This service is filtering data on the basis of minimum and maximum dates passed by user as Input parameter. Now I am not getting how do I apply filter so that the service will display data only for hours between 9 AM to 1 PM for the input range of date passed by user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for e.g&lt;/P&gt;&lt;P&gt;I want to display data from 1 september to 13 september only for hours 9 AM to 1 PM for temperature.&lt;/P&gt;&lt;P&gt;1 september and 13 september is passed by user as input parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking forward for help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Meenakshi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 12:40:48 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525380#M19650</guid>
      <dc:creator>magrawal</dc:creator>
      <dc:date>2016-09-14T12:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to query a datatable on both date and time basis.</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525381#M19651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;As you say you have starttime and endtime datetimepicker widget&amp;nbsp; you should uncheck the initiallizecurrentdatetime checkbox, so before passing to this &lt;/P&gt;&lt;P&gt;query parameters &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;var query = {&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp; "filters": {&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "fieldName": "timestamp",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type": "BETWEEN",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "from": minDate, // Input parameter for minimum date&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "to": maxDate &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;// Input parameter for maximum date&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp; }&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;};&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;You may need to use the dateAddhours snippet as because you may need to display records between 9AM &amp;amp; 1PM only&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&lt;/P&gt;&lt;P&gt;// dateValue:DATETIME&lt;/P&gt;&lt;P&gt;var dateValue = &lt;SPAN style="color: #4d4d4f; font-family: 'Source Sans Pro', sans-serif; font-size: 13px;"&gt; minDate, // Input parameter for minimum date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// dateAddHours(dateValue:DATETIME,amount:NUMBER):STRING&lt;/P&gt;&lt;P&gt;var calculatedDateValueStartValue = dateAddHours(dateValue, 9); // added 9 hours to the min date &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;// dateValue:DATETIME&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;var dateValue1 = &lt;SPAN style="color: #4d4d4f; font-family: 'Source Sans Pro', sans-serif; font-size: 13px;"&gt; &lt;SPAN style="color: #4d4d4f; font-family: 'Source Sans Pro', sans-serif; font-size: 13px;"&gt;maxDate &lt;/SPAN&gt;&lt;SPAN style="color: #4d4d4f; font-family: inherit; font-style: inherit; font-weight: inherit; font-size: 13.3333px;"&gt;// Input parameter for maximum date&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;// dateAddHours(dateValue:DATETIME,amount:NUMBER):STRING&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;var calculatedDateValueEndValue = dateAddHours(dateValue1, 13); // added 13 hours to the max date &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;then you can do the usual thing &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;var query = {&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp; "filters": {&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "fieldName": "timestamp",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type": "BETWEEN",&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "from": &lt;SPAN style="font-size: 13.3333px;"&gt;calculatedDateValueStartValue &lt;/SPAN&gt;, // Input parameter for minimum date&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "to": &lt;SPAN style="font-size: 13.3333px;"&gt;calculatedDateValueEndValue &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;// Input parameter for maximum date&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&amp;nbsp; }&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;};&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;I have not tested this but i think you should give it a go ...!&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Hope this helps..!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 15:25:53 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525381#M19651</guid>
      <dc:creator>nkhose</dc:creator>
      <dc:date>2016-09-14T15:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to query a datatable on both date and time basis.</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525382#M19652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;Hello Nilesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;Thanks but it's not the solution of my problem.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;I need to display data only from 9 AM to 1 PM&amp;nbsp; for all days ranging from 1 september(minDate) to 13 september(maxDate).&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;The solution you have posted is filtering my data as 2016-09-01 09:00:00 to 2016-09-13 13:00:00&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;It is displaying all instances of data from 2 september to 12 september whether it is between 9 AM to 1 PM or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;For each day that falls in range I need to display data only for fix time interval, i.e. &lt;SPAN style="color: #4d4d4f; font-family: 'Source Sans Pro', sans-serif; font-size: 13px;"&gt;9 AM to 1 PM&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 16:14:20 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525382#M19652</guid>
      <dc:creator>magrawal</dc:creator>
      <dc:date>2016-09-14T16:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to query a datatable on both date and time basis.</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525383#M19653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can filter the results after querying the data table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;// result: INFOTABLE dataShape: "undefined"&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;var data = me.QueryDataTableEntries(params);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Source Sans Pro', sans-serif; color: #4d4d4f;"&gt;&lt;/P&gt;&lt;P&gt;var params = {&lt;/P&gt;&lt;P&gt;&amp;nbsp; infoTableName : "InfoTable",&lt;/P&gt;&lt;P&gt;&amp;nbsp; dataShapeName : "yourdatashape" &lt;SPAN style="font-size: 13.3333px;"&gt; //change to your datashape name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// CreateInfoTableFromDataShape(infoTableName:STRING("InfoTable"), dataShapeName:STRING):INFOTABLE(&lt;SPAN style="font-size: 13.3333px;"&gt;yourdatashape&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;var result = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var tableLength = &lt;SPAN style="color: #4d4d4f; font-family: 'Source Sans Pro', sans-serif; font-size: 13px;"&gt;data&lt;/SPAN&gt;.rows.length;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for (var x = 0; x &amp;lt; tableLength; x++) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; var row = &lt;SPAN style="color: #4d4d4f; font-family: 'Source Sans Pro', sans-serif; font-size: 13px;"&gt;data&lt;/SPAN&gt;.rows&lt;X&gt;;&lt;/X&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var newEntry = new Object();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(row.timestamp.getHours() &amp;gt; 9 &amp;amp;&amp;amp; row.timestamp.getHours() &amp;lt; 13){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newEntry.desccription = row.desccription; //change to your required column name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newEntry.count = row.count; &lt;SPAN style="font-size: 13.3333px;"&gt; //change to your required column name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newEntry.name = row.name; &lt;SPAN style="font-size: 13.3333px;"&gt; //change to your required column name&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; result.AddRow(newEntry);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2016 20:50:17 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525383#M19653</guid>
      <dc:creator>gvejandla</dc:creator>
      <dc:date>2016-09-14T20:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to query a datatable on both date and time basis.</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525384#M19654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just one appointment, if you have the server on a different TimeZone than the User, this code won't give the expected results, as it's executed on server TimeZone.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 12:39:18 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525384#M19654</guid>
      <dc:creator>CarlesColl</dc:creator>
      <dc:date>2016-09-15T12:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to query a datatable on both date and time basis.</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525385#M19655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then what will the best solution because I have server in different timezone than user.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 12:43:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525385#M19655</guid>
      <dc:creator>magrawal</dc:creator>
      <dc:date>2016-09-15T12:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to query a datatable on both date and time basis.</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525386#M19656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think about two ways to do this (but not very elegant).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) With a "for" loop, create a query for each day, retrieve the data of each day and make a UNION of these infotable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) With a "for" loop, create a big query with OR and combine queries of each day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 13:51:08 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525386#M19656</guid>
      <dc:creator>qngo</dc:creator>
      <dc:date>2016-09-15T13:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to query a datatable on both date and time basis.</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525387#M19657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It will also lead an issue of timezone. Users are in different timezone than the server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 15:38:20 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525387#M19657</guid>
      <dc:creator>magrawal</dc:creator>
      <dc:date>2016-09-15T15:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to query a datatable on both date and time basis.</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525388#M19658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then you are out of luck, sorry, TW it's not well prepared for multi-timezone environments.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this reason we had customized all Standard TW Time Related Widgets to support TimeZones, and also build a server side extension to work with Dates on TimeZones...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 15:51:53 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525388#M19658</guid>
      <dc:creator>CarlesColl</dc:creator>
      <dc:date>2016-09-15T15:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to query a datatable on both date and time basis.</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525389#M19659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Sep 2016 17:55:56 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525389#M19659</guid>
      <dc:creator>magrawal</dc:creator>
      <dc:date>2016-09-15T17:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to query a datatable on both date and time basis.</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525390#M19660</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 am working on similar use case, But I need to get the data using the rest api call. I need to pass the input time parameters (from date, to date) from the postman or any other rest API testing application, and as a result output I need to get the data for that particular time period.&lt;/P&gt;&lt;P&gt;Is it possible to pass inputs to a service using REST call? Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Yogesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2017 04:51:31 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-query-a-datatable-on-both-date-and-time-basis/m-p/525390#M19660</guid>
      <dc:creator>bkanipakam-2</dc:creator>
      <dc:date>2017-08-30T04:51:31Z</dc:date>
    </item>
  </channel>
</rss>

