Hi team,
I want to group by signupdate in properties. But the date-data is being recorded as time-stamp eg : 2018-07-15T21:09:23.000Z
Help me extract date out time-stamp.
Here is the query I have written
function main()
{
return Events({from_date:'2018-07-07',to_date: '2018-07-16'})
.filter(function(event) { return event.name == "abc"})
.groupBy(
["name","properties.signupDate"],
mixpanel.reducer.count()
);
}
I would want to get data for the time range 7 July 2018 to 16 July 2018
Thanks
Best answer by taliabrown
use the built in mixpanel.numeric_bucket() https://developer.mixpanel.com/docs/jql-api-reference#section--hr-span-style-font-family-courier-mixpanel-numeric_bucket-span-
.groupBy(
[mixpanel.numeric_bucket('properties.signupDate', mixpanel.daily_time_buckets)],
mixpanel.reducer.count());
that work?