{"id":18940,"date":"2019-06-12T09:26:25","date_gmt":"2019-06-12T09:26:25","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=18940"},"modified":"2022-06-14T14:49:21","modified_gmt":"2022-06-14T09:19:21","slug":"useful-tip-for-the-local-and-utc-setting-in-powerapps","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2019\/06\/useful-tip-for-the-local-and-utc-setting-in-powerapps\/","title":{"rendered":"Useful tip for the Local and UTC setting in PowerApps"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>Handling dates with <strong>Date Time Zone<\/strong> in PowerApps can be tricky. So while handling the dates in PowerApps you should be aware of few <strong>Date Time Zone<\/strong> settings. In this blog we will be discussing the same.<\/p>\n<p>Date Time Zone Property in PowerApps can be set through <strong>Date Picker<\/strong> control. Under PowerApps inside <strong>Date Picker<\/strong> control there are two options available for <strong>Date Time Zone &#8211; <\/strong>Local and UTC respectively. You can find the same in below screenshot:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-18941\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png\" alt=\"Useful tip for the Local and UTC setting in PowerApps\" width=\"1033\" height=\"446\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png 1033w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-300x130.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-768x332.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-1024x442.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/1Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-660x285.png 660w\" sizes=\"(max-width: 1033px) 100vw, 1033px\" \/><\/p>\n<p>Depending upon which option you select in <strong>Date Time Zone<\/strong>, the date and time returned by the control behave differently.\u00a0So make sure that this value is set correctly to meet your business scenario.<\/p>\n<p>When you are developing PowerApps you need to make sure whether to use Local or UTC <strong>Date Time Zone<\/strong> depending upon the connector you are dealing with.<\/p>\n<p>The user should experience the same date in PowerApps as well as in the connector to which PowerApps is integrated with.<\/p>\n<p>In this blog we will explore a simple setting to handle the date and time fields of Dynamics 365 CRM according to user time zone in PowerApps.<\/p>\n<p>Let\u2019s consider an example by creating sample PowerApps which will demonstrate how Local and UTC date pickers work:<\/p>\n<p><strong>1<\/strong>. Create a default Canvas app for <strong>Opportunity<\/strong> entity by using Dynamics 365 CRM. For know-how you can refer the blog <a href=\"https:\/\/www.inogic.com\/blog\/2018\/07\/create-records-in-dynamics-365-with-canvas-powerapp\/\">here<\/a>.<\/p>\n<p><strong>2<\/strong>. As you know Opportunity entity contains <strong>Estimated Close Date<\/strong>, lets create the opportunity record in CRM with below <strong>Estimated Closed Date <\/strong>set:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-18942\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/2Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png\" alt=\"Useful tip for the Local and UTC setting in PowerApps\" width=\"1206\" height=\"571\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/2Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png 1206w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/2Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-300x142.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/2Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-768x364.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/2Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-1024x485.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/2Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-660x312.png 660w\" sizes=\"(max-width: 1206px) 100vw, 1206px\" \/><\/p>\n<p><strong>3<\/strong>. Now, while accessing the same opportunity through PowerApps, we came across different dates for the same opportunity as shown below:<\/p>\n<p style=\"padding-left: 120px;\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18943\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/3Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png\" alt=\"Useful tip for the Local and UTC setting in PowerApps\" width=\"442\" height=\"662\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/3Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png 442w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/3Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-200x300.png 200w\" sizes=\"(max-width: 442px) 100vw, 442px\" \/><\/p>\n<p><strong>4<\/strong>. In this scenario, the time zone of Dynamics 365 CRM instance on which we were working was set as <strong>Mountain Time<\/strong> as shown in below screenshot:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-18944\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/4Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png\" alt=\"Useful tip for the Local and UTC setting in PowerApps\" width=\"972\" height=\"525\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/4Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png 939w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/4Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-300x162.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/4Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-768x415.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/4Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-660x356.png 660w\" sizes=\"(max-width: 972px) 100vw, 972px\" \/><\/p>\n<p>But the app was running on phone where time zone was set as <strong>Indian Standard Time<\/strong>.<\/p>\n<p>To avoid such scenarios there is a simple <strong>Date Time Zone<\/strong> setting in PowerApps that can be used while creating\/updating records in Dynamics 365 CRM through PowerApps.<\/p>\n<p><strong>5<\/strong>. In the next scenario, it was observed that the Date Time Zone in PowerApps was kept as UTC option which was converting the date in UTC format and hence the difference in date field.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-18945\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/5Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png\" alt=\"Useful tip for the Local and UTC setting in PowerApps\" width=\"1133\" height=\"460\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/5Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png 1133w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/5Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-300x122.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/5Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-768x312.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/5Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-1024x416.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/5Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-660x268.png 660w\" sizes=\"(max-width: 1133px) 100vw, 1133px\" \/><\/p>\n<p><strong>6<\/strong>. We simply changed <strong>Date time zone<\/strong> setting to <strong>Local <\/strong>option and it worked. Change it to Local as shown in below screenshot:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-18946\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/6Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png\" alt=\"Useful tip for the Local and UTC setting in PowerApps\" width=\"1059\" height=\"449\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/6Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png 1059w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/6Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-300x127.png 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/6Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-768x326.png 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/6Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-1024x434.png 1024w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/6Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-660x280.png 660w\" sizes=\"(max-width: 1059px) 100vw, 1059px\" \/><\/p>\n<p><strong>7<\/strong>. In this case, if you observe <strong>Estimated Close Date<\/strong> reflected in PowerApps then you will see that it is exactly same as latest date value in CRM. You can see in our example that the same date has been set in the PowerApps:<\/p>\n<p style=\"padding-left: 120px;\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-18947\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/7Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png\" alt=\"Useful tip for the Local and UTC setting in PowerApps\" width=\"442\" height=\"655\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/7Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps.png 442w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2019\/06\/7Useful-tip-for-the-Local-and-UTC-setting-in-PowerApps-202x300.png 202w\" sizes=\"(max-width: 442px) 100vw, 442px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>With this simple setting in PowerApps user can handle date and time field effectively.<\/p>\n<h2 style=\"text-align: left;\"><div class=\"su-heading su-heading-style-default su-heading-align-center\" id=\"\" style=\"font-size:15px;margin-bottom:5px\"><div class=\"su-heading-inner\">Free 70% of storage space in CRM with Attachment Management Apps!<\/div><\/div><\/h2>\n<p><em><strong><a href=\"https:\/\/www.inogic.com\/product\/productivity-apps\/attach-2-dynamics-365-crm-upload-multiple-files-sharepoint-cloud-storage\" target=\"_blank\" rel=\"noopener noreferrer\">Attach2Dynamics<\/a> &#8211; Store and manage documents\/attachments in cloud storage of your choice &#8211; SharePoint, Dropbox or Azure Blob Storage from within Dynamics 365 CRM.<\/strong><\/em><br \/>\n<em><strong><a href=\"https:\/\/www.inogic.com\/product\/productivity-apps\/dynamics-365-crm-sharepoint-security-metadata-sync\" target=\"_blank\" rel=\"noopener noreferrer\">SharePoint Security Sync<\/a><\/strong> \u2013 Robust and secure solution to integrate Dynamics 365 CRM and SharePoint Security Sync thereby ensuring secure access to confidential documents stored in SharePoint.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Handling dates with Date Time Zone in PowerApps can be tricky. So while handling the dates in PowerApps you should be aware of few Date Time Zone settings. In this blog we will be discussing the same. Date Time Zone Property in PowerApps can be set through Date Picker control. Under PowerApps inside Date\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2019\/06\/useful-tip-for-the-local-and-utc-setting-in-powerapps\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":23745,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[38,44],"tags":[1170,1882],"class_list":["post-18940","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-powerapps","category-power-apps","tag-microsoft-powerapps","tag-powerapps"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/18940","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=18940"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/18940\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media\/23745"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=18940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=18940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=18940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}