Solved

Data for users who have signed up on a particular date

  • 8 January 2019
  • 2 replies
  • 220 views

Userlevel 2
Badge

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


icon

Best answer by taliabrown 10 January 2019, 00:42

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?


View original

2 replies

Userlevel 3
Badge

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?


Userlevel 2
Badge

Yeah that worked- I just made a custom bucket for my date range. Thanks for the jumping off point


Reply