{"id":31823,"date":"2022-06-15T14:09:50","date_gmt":"2022-06-15T08:39:50","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=31823"},"modified":"2022-06-15T11:43:15","modified_gmt":"2022-06-15T06:13:15","slug":"format-date-time-value-using-formatting-api-in-pcf-control","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/","title":{"rendered":"Format date-time value using Formatting API in PCF Control"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>In our recent project, we created a PCF Control in which we designed a date-time control. In the same control, we had a requirement to format the input date value to the given <a href=\"https:\/\/docs.microsoft.com\/en-us\/power-apps\/developer\/component-framework\/reference\/datetimefieldbehavior\" target=\"_blank\" rel=\"noopener\">Date\/Time field behavior<\/a> in the date\/time field of Dynamics 365 CRM. In Dynamics 365 CRM, date\/time field have three types of behavior such as User Local, Date Only, Time-Zone Independent as shown in the below screenshot:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-31824\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control.jpeg\" alt=\"PCF Control\" width=\"832\" height=\"514\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control.jpeg 832w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control-300x185.jpeg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control-768x474.jpeg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control-660x408.jpeg 660w\" sizes=\"(max-width: 832px) 100vw, 832px\" \/><\/p>\n<p>To achieve this, we have used the <strong>formatTime<\/strong> method of formatting API in Power Apps. With this method, you can format the date\/time values in dateTime field behavior.<\/p>\n<p>Please find below the code to format the input date\/time values in PCF Control:<\/p>\n<pre class=\"lang:css gutter:true start:1\">\/\/Function\u00a0that\u00a0return\u00a0result\u00a0in\u00a0datetime\u00a0format\u00a0from\u00a0input\u00a0date value\r\n\r\nformatToTime\r\n\r\n(context:\u00a0ComponentFramework.Context&lt;IInputs&gt;,\u00a0inputDateValue:any)\u00a0{\r\n\r\nreturn\u00a0context.formatting.formatTime(inputDateValue, 0);\r\n\r\n}\r\n\r\n\/\/Function\u00a0that\u00a0return\u00a0result\u00a0in\u00a0datetime\u00a0format\u00a0from\u00a0input\u00a0date value\r\n\r\nformatToTime (context:\u00a0ComponentFramework.Context&lt;IInputs&gt;,\u00a0inputDateValue:any){\r\n\r\nreturn\u00a0context.formatting.formatTime(inputDateValue, 1);\r\n\r\n}<\/pre>\n<p>After running the debugger, the result of formatting input date\/time values to dateTime format will be as below:<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-31825\" style=\"border: 1px solid #0a0a0a; padding: 1px; margin: 1px;\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/2PCF-Control.jpeg\" alt=\"PCF Control\" width=\"973\" height=\"385\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/2PCF-Control.jpeg 556w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/2PCF-Control-300x119.jpeg 300w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>With the help of Formatting API in Power Apps, we can easily format the input date values to the dateTime behavior format.<\/p>\n<p><a href=\"https:\/\/www.inogic.com\/product\/productivity-apps\/attach-2-dynamics-365-crm-upload-multiple-files-sharepoint-cloud-storage\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" class=\"alignnone wp-image-31827\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/A2D.jpg\" alt=\"Attach2Dynamics\" width=\"840\" height=\"210\" srcset=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/A2D.jpg 800w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/A2D-300x75.jpg 300w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/A2D-768x192.jpg 768w, https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/A2D-660x165.jpg 660w\" sizes=\"(max-width: 840px) 100vw, 840px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction In our recent project, we created a PCF Control in which we designed a date-time control. In the same control, we had a requirement to format the input date value to the given Date\/Time field behavior in the date\/time field of Dynamics 365 CRM. In Dynamics 365 CRM, date\/time field have three types of\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/\">Read More: Format date-time value using Formatting API in PCF Control &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,1929],"tags":[1941],"class_list":["post-31823","post","type-post","status-publish","format-standard","hentry","category-dynamics-365","category-pcf","tag-pcf-control"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"Introduction In our recent project, we created a PCF Control in which we designed a date-time control. In the same control, we had a requirement to format the input date value to the given Date\/Time field behavior in the date\/time field of Dynamics 365 CRM. In Dynamics 365 CRM, date\/time field have three types of\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Inogic\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Format date-time value using Formatting API in PCF Control - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta property=\"og:description\" content=\"Introduction In our recent project, we created a PCF Control in which we designed a date-time control. In the same control, we had a requirement to format the input date value to the given Date\/Time field behavior in the date\/time field of Dynamics 365 CRM. In Dynamics 365 CRM, date\/time field have three types of\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control.jpeg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control.jpeg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"832\" \/>\n\t\t<meta property=\"og:image:height\" content=\"514\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-06-15T08:39:50+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-06-15T06:13:15+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inogicindia\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Format date-time value using Formatting API in PCF Control - Microsoft Dynamics 365 CRM Tips and Tricks\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Introduction In our recent project, we created a PCF Control in which we designed a date-time control. In the same control, we had a requirement to format the input date value to the given Date\/Time field behavior in the date\/time field of Dynamics 365 CRM. In Dynamics 365 CRM, date\/time field have three types of\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@inogic\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control.jpeg\" \/>\n\t\t<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t\t<meta name=\"twitter:data1\" content=\"Inogic\" \/>\n\t\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#blogposting\",\"name\":\"Format date-time value using Formatting API in PCF Control - Microsoft Dynamics 365 CRM Tips and Tricks\",\"headline\":\"Format date-time value using Formatting API in PCF Control\",\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/1PCF-Control.jpeg\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#articleImage\",\"width\":832,\"height\":514,\"caption\":\"PCF Control\"},\"datePublished\":\"2022-06-15T14:09:50+05:30\",\"dateModified\":\"2022-06-15T11:43:15+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#webpage\"},\"articleSection\":\"Dynamics 365, PCF, PCF Control\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/power-apps\\\/#listItem\",\"name\":\"Microsoft PowerApps\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/power-apps\\\/#listItem\",\"position\":2,\"name\":\"Microsoft PowerApps\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/power-apps\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/power-apps\\\/pcf\\\/#listItem\",\"name\":\"PCF\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/power-apps\\\/pcf\\\/#listItem\",\"position\":3,\"name\":\"PCF\",\"item\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/power-apps\\\/pcf\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#listItem\",\"name\":\"Format date-time value using Formatting API in PCF Control\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/power-apps\\\/#listItem\",\"name\":\"Microsoft PowerApps\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#listItem\",\"position\":4,\"name\":\"Format date-time value using Formatting API in PCF Control\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/category\\\/power-apps\\\/pcf\\\/#listItem\",\"name\":\"PCF\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"By Inogic\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inogic-logo.png\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#organizationLogo\",\"width\":1000,\"height\":325,\"caption\":\"inogic logo\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#organizationLogo\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/inogicindia\",\"https:\\\/\\\/twitter.com\\\/inogic\",\"https:\\\/\\\/www.instagram.com\\\/inogicindia\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCM4V7ousgLSu1hbOEv4DUuQ\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/inogicindia\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/\",\"name\":\"Inogic\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Inogic\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#webpage\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/\",\"name\":\"Format date-time value using Formatting API in PCF Control - Microsoft Dynamics 365 CRM Tips and Tricks\",\"description\":\"Introduction In our recent project, we created a PCF Control in which we designed a date-time control. In the same control, we had a requirement to format the input date value to the given Date\\\/Time field behavior in the date\\\/time field of Dynamics 365 CRM. In Dynamics 365 CRM, date\\\/time field have three types of\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/2022\\\/06\\\/format-date-time-value-using-formatting-api-in-pcf-control\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/author\\\/inogic-2\\\/#author\"},\"datePublished\":\"2022-06-15T14:09:50+05:30\",\"dateModified\":\"2022-06-15T11:43:15+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/\",\"name\":\"Microsoft Dynamics 365 CRM Tips and Tricks\",\"alternateName\":\"Inogic\",\"description\":\"By Inogic\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.inogic.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Format date-time value using Formatting API in PCF Control - Microsoft Dynamics 365 CRM Tips and Tricks","description":"Introduction In our recent project, we created a PCF Control in which we designed a date-time control. In the same control, we had a requirement to format the input date value to the given Date\/Time field behavior in the date\/time field of Dynamics 365 CRM. In Dynamics 365 CRM, date\/time field have three types of","canonical_url":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#blogposting","name":"Format date-time value using Formatting API in PCF Control - Microsoft Dynamics 365 CRM Tips and Tricks","headline":"Format date-time value using Formatting API in PCF Control","author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control.jpeg","@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#articleImage","width":832,"height":514,"caption":"PCF Control"},"datePublished":"2022-06-15T14:09:50+05:30","dateModified":"2022-06-15T11:43:15+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#webpage"},"isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#webpage"},"articleSection":"Dynamics 365, PCF, PCF Control"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.inogic.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/power-apps\/#listItem","name":"Microsoft PowerApps"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/power-apps\/#listItem","position":2,"name":"Microsoft PowerApps","item":"https:\/\/www.inogic.com\/blog\/category\/power-apps\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/power-apps\/pcf\/#listItem","name":"PCF"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/power-apps\/pcf\/#listItem","position":3,"name":"PCF","item":"https:\/\/www.inogic.com\/blog\/category\/power-apps\/pcf\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#listItem","name":"Format date-time value using Formatting API in PCF Control"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/power-apps\/#listItem","name":"Microsoft PowerApps"}},{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#listItem","position":4,"name":"Format date-time value using Formatting API in PCF Control","previousItem":{"@type":"ListItem","@id":"https:\/\/www.inogic.com\/blog\/category\/power-apps\/pcf\/#listItem","name":"PCF"}}]},{"@type":"Organization","@id":"https:\/\/www.inogic.com\/blog\/#organization","name":"Microsoft Dynamics 365 CRM Tips and Tricks","description":"By Inogic","url":"https:\/\/www.inogic.com\/blog\/","logo":{"@type":"ImageObject","url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2023\/02\/inogic-logo.png","@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#organizationLogo","width":1000,"height":325,"caption":"inogic logo"},"image":{"@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#organizationLogo"},"sameAs":["https:\/\/www.facebook.com\/inogicindia","https:\/\/twitter.com\/inogic","https:\/\/www.instagram.com\/inogicindia\/","https:\/\/www.youtube.com\/channel\/UCM4V7ousgLSu1hbOEv4DUuQ","https:\/\/www.linkedin.com\/company\/inogicindia"]},{"@type":"Person","@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author","url":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/","name":"Inogic","image":{"@type":"ImageObject","@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/839d9ae7d2b941d2d09e91df322267a429821f2ce5494302b53bd5ca3679f1a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Inogic"}},{"@type":"WebPage","@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#webpage","url":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/","name":"Format date-time value using Formatting API in PCF Control - Microsoft Dynamics 365 CRM Tips and Tricks","description":"Introduction In our recent project, we created a PCF Control in which we designed a date-time control. In the same control, we had a requirement to format the input date value to the given Date\/Time field behavior in the date\/time field of Dynamics 365 CRM. In Dynamics 365 CRM, date\/time field have three types of","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.inogic.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/#breadcrumblist"},"author":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"creator":{"@id":"https:\/\/www.inogic.com\/blog\/author\/inogic-2\/#author"},"datePublished":"2022-06-15T14:09:50+05:30","dateModified":"2022-06-15T11:43:15+05:30"},{"@type":"WebSite","@id":"https:\/\/www.inogic.com\/blog\/#website","url":"https:\/\/www.inogic.com\/blog\/","name":"Microsoft Dynamics 365 CRM Tips and Tricks","alternateName":"Inogic","description":"By Inogic","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.inogic.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Microsoft Dynamics 365 CRM Tips and Tricks - By Inogic","og:type":"article","og:title":"Format date-time value using Formatting API in PCF Control - Microsoft Dynamics 365 CRM Tips and Tricks","og:description":"Introduction In our recent project, we created a PCF Control in which we designed a date-time control. In the same control, we had a requirement to format the input date value to the given Date\/Time field behavior in the date\/time field of Dynamics 365 CRM. In Dynamics 365 CRM, date\/time field have three types of","og:url":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/","og:image":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control.jpeg","og:image:secure_url":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control.jpeg","og:image:width":832,"og:image:height":514,"article:published_time":"2022-06-15T08:39:50+00:00","article:modified_time":"2022-06-15T06:13:15+00:00","article:publisher":"https:\/\/www.facebook.com\/inogicindia","twitter:card":"summary_large_image","twitter:site":"@inogic","twitter:title":"Format date-time value using Formatting API in PCF Control - Microsoft Dynamics 365 CRM Tips and Tricks","twitter:description":"Introduction In our recent project, we created a PCF Control in which we designed a date-time control. In the same control, we had a requirement to format the input date value to the given Date\/Time field behavior in the date\/time field of Dynamics 365 CRM. In Dynamics 365 CRM, date\/time field have three types of","twitter:creator":"@inogic","twitter:image":"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2022\/06\/1PCF-Control.jpeg","twitter:label1":"Written by","twitter:data1":"Inogic","twitter:label2":"Est. reading time","twitter:data2":"1 minute"},"aioseo_meta_data":{"post_id":"31823","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2023-02-02 06:40:34","updated":"2025-07-04 09:22:33","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\/category\/power-apps\/\" title=\"Microsoft PowerApps\">Microsoft PowerApps<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.inogic.com\/blog\/category\/power-apps\/pcf\/\" title=\"PCF\">PCF<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tFormat date-time value using Formatting API in PCF Control\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.inogic.com\/blog"},{"label":"Microsoft PowerApps","link":"https:\/\/www.inogic.com\/blog\/category\/power-apps\/"},{"label":"PCF","link":"https:\/\/www.inogic.com\/blog\/category\/power-apps\/pcf\/"},{"label":"Format date-time value using Formatting API in PCF Control","link":"https:\/\/www.inogic.com\/blog\/2022\/06\/format-date-time-value-using-formatting-api-in-pcf-control\/"}],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/31823","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=31823"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/31823\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=31823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=31823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=31823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}