Skip to content

Instantly share code, notes, and snippets.

@cbess
Last active October 6, 2015 20:38
Show Gist options
  • Save cbess/3049978 to your computer and use it in GitHub Desktop.
Save cbess/3049978 to your computer and use it in GitHub Desktop.
Sequelize sample.
// get metric for the object id and today's date
var currentDate = new Date();
currentDate.setHours(0);
currentDate.setMinutes(0);
currentDate.setSeconds(0);
console.log(currentDate.toString());
StatMetric.find({
where : { object_id: metricObject.id, stat_type_id: statTypeId, current_date: currentDate}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment