{"id":796,"date":"2012-03-13T11:10:34","date_gmt":"2012-03-13T09:10:34","guid":{"rendered":"http:\/\/hen.co.za\/blog\/?p=796"},"modified":"2012-03-13T11:10:34","modified_gmt":"2012-03-13T09:10:34","slug":"getting-month-names-with-tsql","status":"publish","type":"post","link":"https:\/\/hen.co.za\/blog\/2012\/03\/getting-month-names-with-tsql\/","title":{"rendered":"Getting month names with tsql"},"content":{"rendered":"<p>A quick tip using tsql to get a list of the month names.<\/p>\n<blockquote><p>SELECT Number + 1 as [Number],<br \/>\nDateName(mm,DateAdd(mm,Number,0)) as [Name]<br \/>\nFROM master..spt_values<br \/>\nWHERE Type = &#8216;P&#8217; and Number &lt; 12<\/p><\/blockquote>\n<p>Shamelessly copied from somewhere on the Internet&#8230; \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A quick tip using tsql to get a list of the month names. SELECT Number + 1 as [Number], DateName(mm,DateAdd(mm,Number,0)) as [Name] FROM master..spt_values WHERE Type = &#8216;P&#8217; and Number &lt; 12 Shamelessly copied from somewhere on the Internet&#8230; \ud83d\ude09<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,16],"tags":[149,150,151,148],"class_list":["post-796","post","type-post","status-publish","format-standard","hentry","category-development","category-reference","tag-date","tag-month","tag-name","tag-tsql"],"_links":{"self":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts\/796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/comments?post=796"}],"version-history":[{"count":2,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts\/796\/revisions"}],"predecessor-version":[{"id":798,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/posts\/796\/revisions\/798"}],"wp:attachment":[{"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/media?parent=796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/categories?post=796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hen.co.za\/blog\/wp-json\/wp\/v2\/tags?post=796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}