<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DateTime output issue in Microsoft 365 - Outlook in Digital Exchange</title>
    <link>https://community.blueprism.com/t5/Digital-Exchange/DateTime-output-issue-in-Microsoft-365-Outlook/m-p/96778#M2966</link>
    <description>Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/53478"&gt;@XECC8YM&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;There's one way to handle this with Newtonsoft. You can create a ​&lt;STRONG&gt;JsonSerializerSettings&lt;/STRONG&gt; instance and set the value of the &lt;STRONG&gt;DateParseHandling&lt;/STRONG&gt; property to None. This will result in DateTime values not be processed by Newtonsoft. Instead, they will passed through as strings.&lt;BR /&gt;&lt;BR /&gt;To do this, go to the Global Code section of the VBO and search for the function titled &lt;EM&gt;&lt;STRONG&gt;ConvertToDataTable&lt;/STRONG&gt;&lt;/EM&gt;. You want to change the code within that function from this:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-csharp"&gt;&lt;CODE&gt;public DataTable ConvertToDataTable(string json)
{
	object o = JsonConvert.DeserializeObject(json);
	return (DataTable)DeserialiseGeneric(o, true);
}​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;to this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE class="language-csharp"&gt;&lt;CODE&gt;public DataTable ConvertToDataTable(string json)
{
	JsonSerializerSettings serializerSettings = new JsonSerializerSettings();
	serializerSettings.DateParseHandling = DateParseHandling.None;

	object o = JsonConvert.DeserializeObject(json, serializerSettings);
	return (DataTable)DeserialiseGeneric(o, true);
}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Once you're done, the Global Code should look like this:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="35164.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/35230i57EF5C76899BE715/image-size/large?v=v2&amp;amp;px=999" role="button" title="35164.png" alt="35164.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Keep in mind that if you are performing any date/time calculations you will now have to handle changing the raw string to an actual DateTime data item.&lt;/P&gt;
Cheers,&lt;BR /&gt;Eric</description>
    <pubDate>Wed, 07 Dec 2022 15:50:15 GMT</pubDate>
    <dc:creator>ewilson</dc:creator>
    <dc:date>2022-12-07T15:50:15Z</dc:date>
    <item>
      <title>DateTime output issue in Microsoft 365 - Outlook</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/DateTime-output-issue-in-Microsoft-365-Outlook/m-p/96777#M2965</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have a process that pulls email from a shared mailbox. When the list is returned from MS Grapgh API response, i get the response as createdDateTime":"2022-11-29T18:54:00Z" and when the JOSN code stage runs, the output collection has the field createdDateTime with value "11/29/2022 11:54:00 PM". This is misleading as it is trying to convert an existing UTC time value to a UTC time based on the current time zone my machine is on.&lt;BR /&gt;&lt;BR /&gt;I did some digging and seems that NewtonSoft JSON is causing this issue. &lt;BR /&gt;&lt;BR /&gt;Anyone else are having this issue? how do i overcome it as my resource PCs are in multiple location [1-EST, 2-PST] and i do not wish to hard code the timespan.</description>
      <pubDate>Tue, 29 Nov 2022 19:33:28 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/DateTime-output-issue-in-Microsoft-365-Outlook/m-p/96777#M2965</guid>
      <dc:creator>XECC8YM</dc:creator>
      <dc:date>2022-11-29T19:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: DateTime output issue in Microsoft 365 - Outlook</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/DateTime-output-issue-in-Microsoft-365-Outlook/m-p/96778#M2966</link>
      <description>Hi &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/53478"&gt;@XECC8YM&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;There's one way to handle this with Newtonsoft. You can create a ​&lt;STRONG&gt;JsonSerializerSettings&lt;/STRONG&gt; instance and set the value of the &lt;STRONG&gt;DateParseHandling&lt;/STRONG&gt; property to None. This will result in DateTime values not be processed by Newtonsoft. Instead, they will passed through as strings.&lt;BR /&gt;&lt;BR /&gt;To do this, go to the Global Code section of the VBO and search for the function titled &lt;EM&gt;&lt;STRONG&gt;ConvertToDataTable&lt;/STRONG&gt;&lt;/EM&gt;. You want to change the code within that function from this:&lt;BR /&gt;&lt;BR /&gt;
&lt;PRE class="language-csharp"&gt;&lt;CODE&gt;public DataTable ConvertToDataTable(string json)
{
	object o = JsonConvert.DeserializeObject(json);
	return (DataTable)DeserialiseGeneric(o, true);
}​&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;to this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE class="language-csharp"&gt;&lt;CODE&gt;public DataTable ConvertToDataTable(string json)
{
	JsonSerializerSettings serializerSettings = new JsonSerializerSettings();
	serializerSettings.DateParseHandling = DateParseHandling.None;

	object o = JsonConvert.DeserializeObject(json, serializerSettings);
	return (DataTable)DeserialiseGeneric(o, true);
}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Once you're done, the Global Code should look like this:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="35164.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/35230i57EF5C76899BE715/image-size/large?v=v2&amp;amp;px=999" role="button" title="35164.png" alt="35164.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Keep in mind that if you are performing any date/time calculations you will now have to handle changing the raw string to an actual DateTime data item.&lt;/P&gt;
Cheers,&lt;BR /&gt;Eric</description>
      <pubDate>Wed, 07 Dec 2022 15:50:15 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/DateTime-output-issue-in-Microsoft-365-Outlook/m-p/96778#M2966</guid>
      <dc:creator>ewilson</dc:creator>
      <dc:date>2022-12-07T15:50:15Z</dc:date>
    </item>
  </channel>
</rss>

