0

I am trying to retrieve count of rows from parse object by month and year to show analytics by month. I am new to parse sdk and have no idea how to query based on month and year. Please help me in this.

1
  • Can you put the code to understand better your problem? Commented Jun 9, 2016 at 11:33

1 Answer 1

1

monthStart/monthEnd/yearStart/yearEnd is Date

var m_query = new Parse.Quer("COLLECTION");
m_query.greaterThan('createdAt', monthStart);
m_query.lessThan('createdAt', monthEnd);
m_query.count().then(num=> console.log(num));

var y_query = new Parse.Quer("COLLECTION");
y_query.greaterThan('createdAt', yearStart);
y_query.lessThan('createdAt', yearEnd);
y_query.count().then(num=> console.log(num));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.