{"id":8053,"date":"2015-11-23T02:46:08","date_gmt":"2015-11-23T02:46:08","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/11\/23\/sails-js-waterline-query-modifiers-for-dates-with-sails-mysql-open-source-projects-balderdashy-sails\/"},"modified":"2022-08-30T15:03:02","modified_gmt":"2022-08-30T15:03:02","slug":"sails-js-waterline-query-modifiers-for-dates-with-sails-mysql-open-source-projects-balderdashy-sails","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/11\/23\/sails-js-waterline-query-modifiers-for-dates-with-sails-mysql-open-source-projects-balderdashy-sails\/","title":{"rendered":"Sails.js Waterline query modifiers for dates with sails-mysql?-open source projects balderdashy\/sails"},"content":{"rendered":"<p>I just started using Sails.js with its ORM, Waterline, and absolutely love it, but I am not sure how to use query modifiers for dates. I am using sails-mysql. Specifically, I am trying to get rows that have a datetime field between two specific dates. I have tried doing this:<\/p>\n<pre><code>MyModel.find()\n    .where({ datetime_field: { '&gt;=': startDate } })\n    .where({ datetime_field: { '<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I just started using Sails.js with its ORM, Waterline, and absolutely love it, but I am not sure how to use query modifiers for dates. I am using sails-mysql. Specifically, I am trying to get rows that have a datetime field between two specific dates. I have tried doing this: MyModel.find() .where({ datetime_field: { &#8216;&gt;=&#8217;: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8053","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=8053"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8053\/revisions"}],"predecessor-version":[{"id":8661,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/8053\/revisions\/8661"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=8053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=8053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=8053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}