{"id":6937,"date":"2019-02-22T10:41:06","date_gmt":"2019-02-22T09:41:06","guid":{"rendered":"http:\/\/help.sdna.lu\/?p=6937&#038;lang=en"},"modified":"2021-04-28T20:34:11","modified_gmt":"2021-04-28T19:34:11","slug":"query-how-to-remove-time-from-date-accinterest-todate","status":"publish","type":"post","link":"https:\/\/sdna.lu\/?p=6937","title":{"rendered":"Query: Remove time from  AccInterest.ToDate"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\"> Use this query to update incorrect records (SQL Query): <\/h4>\n\n\n<ul>\n<li><span style=\"background-color: #f3f4f5; color: #23282d; font-family: Menlo, Consolas, monaco, monospace; font-size: 14px;\" data-darkreader-inline-bgcolor=\"\" data-darkreader-inline-color=\"\">Select * from [AccInterest] where Not Convert(date, [ToDate]) = [ToDate]<\/span><\/li>\n<\/ul>\n<ul>\n<li><span style=\"background-color: #f3f4f5; color: #23282d; font-family: Menlo, Consolas, monaco, monospace; font-size: 14px;\" data-darkreader-inline-bgcolor=\"\" data-darkreader-inline-color=\"\">Update [AccInterest] Set [ToDate] = convert(date, [ToDate]) where Not Convert(date, [ToDate]) = [ToDate]<\/span><\/li>\n<\/ul>\n\n\n<h4 class=\"wp-block-heading\">Use this query to select incorrect records (MS Access):<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li><code>Select format([ToDate], \"Short Date\") , * from [AccInterest] where Not Format([ToDate], \"Long Time\") = \"00:00:00\"<\/code> <\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Use this query update incorrect records (MS Access):<\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li> <code>Update [AccInterest] Set [ToDate] = format<strong>(<\/strong>[ToDate], \"Short Date\"<strong>)<\/strong> where Not Format([ToDate], \"Long Time\") = \"00:00:00\"<\/code><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Use this query to update incorrect records (SQL Query): Select * from [AccInterest] where Not Convert(date, [ToDate]) = [ToDate] Update [AccInterest] Set [ToDate] = convert(date, [ToDate]) where Not Convert(date, [ToDate]) = [ToDate] Use this query to select incorrect records (MS Access): Select format([ToDate], &#8220;Short Date&#8221;) , * from [AccInterest] where Not Format([ToDate], &#8220;Long Time&#8221;) = [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[487],"tags":[],"class_list":["post-6937","post","type-post","status-publish","format-standard","hentry","category-query"],"_links":{"self":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/6937","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6937"}],"version-history":[{"count":6,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/6937\/revisions"}],"predecessor-version":[{"id":7686,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/6937\/revisions\/7686"}],"wp:attachment":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}