Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
As the querypropertyhistory contains a lot of historical data, how can i efficiently get data for a particular time interval and write an optimized code operation.
// dateValue:DATETIME var dateValue = new Date(); // dateAddDays(dateValue:DATETIME,amount:NUMBER):STRING var calculatedDateValue = dateAddDays(dateValue, -1); var endDate = new Date() var params = { oldestFirst: undefined /* BOOLEAN */, maxItems: undefined /* NUMBER */, endDate: dateValue /* DATETIME */, query: undefined /* QUERY */, startDate: calculatedDateValue /* DATETIME */ }; // result: INFOTABLE dataShape: "undefined" var result = me.QueryPropertyHistory(params);
Hi Sonali,
If you want to fetch 24 Hrs data you can use above code and if you want interval as Hrs , Minutes, Second you can take it from code snippets in TW.
Hi @SonaliPatro
Just wondering if you're still trying to solve your issue. If you have found a solution, please post it for the benefit of others in the community or mark an existing response as the Accepted Solution.
Thanks,
Vibhuti