{"id":438,"date":"2012-10-04T10:47:56","date_gmt":"2012-10-04T15:47:56","guid":{"rendered":"https:\/\/mkncreations.com\/site\/?p=438"},"modified":"2014-10-31T08:23:16","modified_gmt":"2014-10-31T13:23:16","slug":"tsql-how-to-find-quarter-start-and-end-date","status":"publish","type":"post","link":"https:\/\/mkncreations.com\/site\/2012\/10\/tsql-how-to-find-quarter-start-and-end-date\/","title":{"rendered":"TSQL &#8211; How to Find Quarter Start and End Date"},"content":{"rendered":"<p>If you would like to find the start and the end of a Quarter based of a date here is the t-sql code you will need:<\/p>\n<blockquote><p>\nDECLARE @yourdate DATETIME = GETDATE();<\/p>\n<p>SELECT DATEADD(q, DATEDIFF(q, 0, @yourdate), 0) AS [Quarter_Start]<br \/>\n       , DATEADD(d, -1, DATEADD(q, DATEDIFF(q, 0, @yourdate) + 1, 0)) AS [Quarter_End]\n<\/p><\/blockquote>\n<p>For getting the previous Quarter start and end dates refer to this post:<br \/>\n<a href=\"https:\/\/mkncreations.com\/site\/2014\/10\/tsql-how-to-find-previous-quarter-start-and-end-date\/\" title=\"https:\/\/mkncreations.com\/site\/2014\/10\/tsql-how-to-find-previous-quarter-start-and-end-date\/\" target=\"_blank\">https:\/\/mkncreations.com\/site\/2014\/10\/tsql-how-to-find-previous-quarter-start-and-end-date\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you would like to find the start and the end of a Quarter based of a date here is the t-sql code you will&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,12],"tags":[75,76,77,50,49],"class_list":["post-438","post","type-post","status-publish","format-standard","hentry","category-how_to","category-sql","tag-quarter","tag-quarterend","tag-quarterstart","tag-sql-2","tag-tsql"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/438"}],"collection":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/comments?post=438"}],"version-history":[{"count":6,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/438\/revisions"}],"predecessor-version":[{"id":34729,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/posts\/438\/revisions\/34729"}],"wp:attachment":[{"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/media?parent=438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/categories?post=438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mkncreations.com\/site\/wp-json\/wp\/v2\/tags?post=438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}