{"id":159,"date":"2013-03-29T17:59:14","date_gmt":"2013-03-29T21:59:14","guid":{"rendered":"http:\/\/ericburdo.com\/blog\/?p=159"},"modified":"2013-03-29T17:59:14","modified_gmt":"2013-03-29T21:59:14","slug":"converting-to-a-specific-timezone-inside-ssrs","status":"publish","type":"post","link":"http:\/\/ericburdo.com\/blog\/code\/159\/converting-to-a-specific-timezone-inside-ssrs\/","title":{"rendered":"Converting to a specific timezone inside SSRS"},"content":{"rendered":"<p>In Microsoft Report Studio (SSRS), we needed to convert to a specific timezone, instead of the more common &#8220;Convert to Local Timezone&#8221;.<\/p>\n<p>Here is how to do that.<\/p>\n<p>First you MUST <strong>include a reference to System.Core<\/strong>.<\/p>\n<p>Then, put this into an expression.  The Fields!SomeDate.Value is my date field in SSRS.<br \/>\n<code><br \/>\n'MUST ADD REFERENCE to System.Core<\/p>\n<p>=System.TimeZoneInfo.ConvertTimeFromUtc(Fields!SomeDate.Value, System.TimeZoneInfo.FindSystemTimeZoneById(\"Eastern Standard Time\") )<br \/>\n<\/code><\/p>\n<p>VOILA!  It now converts from the UTC date, to the Eastern Standard Time.  There are many time zones you can choose from.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Microsoft Report Studio (SSRS), we needed to convert to a specific timezone, instead of the more common &#8220;Convert to Local Timezone&#8221;. Here is how to do that. First you MUST include a reference to System.Core. Then, put this into an expression. The Fields!SomeDate.Value is my date field in SSRS. &#8216;MUST ADD REFERENCE to System.Core [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[],"class_list":["post-159","post","type-post","status-publish","format-standard","hentry","category-code"],"_links":{"self":[{"href":"http:\/\/ericburdo.com\/blog\/wp-json\/wp\/v2\/posts\/159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ericburdo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ericburdo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ericburdo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ericburdo.com\/blog\/wp-json\/wp\/v2\/comments?post=159"}],"version-history":[{"count":1,"href":"http:\/\/ericburdo.com\/blog\/wp-json\/wp\/v2\/posts\/159\/revisions"}],"predecessor-version":[{"id":160,"href":"http:\/\/ericburdo.com\/blog\/wp-json\/wp\/v2\/posts\/159\/revisions\/160"}],"wp:attachment":[{"href":"http:\/\/ericburdo.com\/blog\/wp-json\/wp\/v2\/media?parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ericburdo.com\/blog\/wp-json\/wp\/v2\/categories?post=159"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ericburdo.com\/blog\/wp-json\/wp\/v2\/tags?post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}