5 Replies Latest reply on Dec 20, 2016 9:29 AM by amarthouna RSS
    Digital One Explorer

    How to use aggregate service[MIN ,MAX ,AVERAGE ,COUNT ,SUM] on DateTime

    Hi

     

    I want to use the aggregates MIN method on TimeStamp[BaseType : DateTime] column

     

    I want output as below:

     

    UserIDTimeStamp
    12016-11-16 24:57:27.412
    22016-11-16 20:53:28.444
    32016-11-16 19:52:26.234

     

    I am taking input as QueryPropertyHistory Service data.

     

    var params = {

      t: MyInfotableInput /* INFOTABLE */,

      columns: "TimeStamp" /* STRING */,

      aggregates: 'MIN' /* STRING */,

      groupByColumns: 'UserID' /* STRING */

    };

     

     

    // result: INFOTABLE

    var result = Resources["InfoTableFunctions"].Aggregate(params);