{"id":2803,"date":"2020-05-13T16:16:44","date_gmt":"2020-05-13T15:16:44","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=2803"},"modified":"2022-02-17T07:13:48","modified_gmt":"2022-02-17T07:13:48","slug":"datetime-3","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/mysql\/queries\/update-queries\/datetime-3","title":{"rendered":"DateTime"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">INSERT or UPDATE row to be Now + # Days<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>Now() + INTERVAL $no_of_days DAY,<\/code><\/pre>\n\n\n\n<p>Some of the values you can use:<\/p>\n\n\n\n<p>DAY<br>HOUR<br>MINUTE<br>MONTH<br>SECOND<br>WEEK<br>YEAR<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Update a DateTime with a random value<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>SET LastActive = NOW() - INTERVAL ROUND(RAND() * 72) HOUR WHERE <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>INSERT or UPDATE row to be Now + # Days Some of the values you can use: DAYHOURMINUTEMONTHSECONDWEEKYEAR Update a DateTime with a random value<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[240],"tags":[],"class_list":["post-2803","post","type-post","status-publish","format-standard","hentry","category-update-queries"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/2803","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=2803"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/2803\/revisions"}],"predecessor-version":[{"id":2834,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/2803\/revisions\/2834"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=2803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=2803"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=2803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}