2 Replies Latest reply on Oct 10, 2017 4:32 AM by skr RSS
    skr Explorer

    With QueryDataTableEntries service to compare between dates


    I'm working on a service which gets two dates as input(Start and End dates) and returns the entries for which the dates in a particular column lies within the input range as an infotable.

    I have used a query with the "BETWEEN" type filter.


    The code i used is:


    var query = {

      "filters": {

        "fieldName": "LoanStartDate",

        "type": "BETWEEN",

        "from": 1483122600000,

        "to": 1517337000000







    var params = {

      maxItems: undefined /* NUMBER */,

      values: ApprovedLoanableAssets /* INFOTABLE*/,

      query: query /* QUERY */,

      source: me.name /* STRING */,

      tags: "Keysight-Customer:"+CustomerID /* TAGS */




    //result: INFOTABLE

    var result = Things[CustomerID+"-LoanPoolAssetDetailDT"].QueryDataTableEntries(params);


    The output is:



    The output is without any entries.Yes, i have checked if there are no entries to be shown, but i'm sure that it consists of atleast one entry which coincides with the query. Can you point where i went wrong. Thanks in advance.