<?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 Blue Prism How to calculate text date times? in Digital Exchange</title>
    <link>https://community.blueprism.com/t5/Digital-Exchange/Blue-Prism-How-to-calculate-text-date-times/m-p/63508#M2551</link>
    <description>&lt;P&gt;is it possible to calculate text dates? Or to remove just the rest of my text?&lt;/P&gt;

&lt;P&gt;I need to calculate days of leave. I have two data items and I must substract one from another. For example 11/3/2017 12:00:00 AM - 3/31/2017 12:00:00 AM. How can I do this? So far I've tried Replace function. I wanted to use Mid, Trim and Left but the characters in my date items are going to change. so sometimes I will have 9 characters (11/3/2017) and sometimes 8 (1/3/2017).&lt;/P&gt;

&lt;P&gt;Which function could I use ?
this format is month/day/year and mine is day/month/year&lt;/P&gt;

--------------------------------------------------&lt;BR /&gt;

&lt;B&gt;Disclaimer:&lt;/B&gt; This content was auto-posted from Stackoverflow. The original Stackoverflow question is here &lt;A href="https://stackoverflow.com/questions/57111575/blue-prism-how-to-calculate-text-date-times"&gt;Stackoverflow Post&lt;/A&gt;, posted by &lt;A href="https://stackoverflow.com/users/10124240/daenerys"&gt;Daenerys&lt;/A&gt;.</description>
    <pubDate>Mon, 05 Aug 2019 14:30:00 GMT</pubDate>
    <dc:creator>Digital_WorkerB</dc:creator>
    <dc:date>2019-08-05T14:30:00Z</dc:date>
    <item>
      <title>Blue Prism How to calculate text date times?</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Blue-Prism-How-to-calculate-text-date-times/m-p/63508#M2551</link>
      <description>&lt;P&gt;is it possible to calculate text dates? Or to remove just the rest of my text?&lt;/P&gt;

&lt;P&gt;I need to calculate days of leave. I have two data items and I must substract one from another. For example 11/3/2017 12:00:00 AM - 3/31/2017 12:00:00 AM. How can I do this? So far I've tried Replace function. I wanted to use Mid, Trim and Left but the characters in my date items are going to change. so sometimes I will have 9 characters (11/3/2017) and sometimes 8 (1/3/2017).&lt;/P&gt;

&lt;P&gt;Which function could I use ?
this format is month/day/year and mine is day/month/year&lt;/P&gt;

--------------------------------------------------&lt;BR /&gt;

&lt;B&gt;Disclaimer:&lt;/B&gt; This content was auto-posted from Stackoverflow. The original Stackoverflow question is here &lt;A href="https://stackoverflow.com/questions/57111575/blue-prism-how-to-calculate-text-date-times"&gt;Stackoverflow Post&lt;/A&gt;, posted by &lt;A href="https://stackoverflow.com/users/10124240/daenerys"&gt;Daenerys&lt;/A&gt;.</description>
      <pubDate>Mon, 05 Aug 2019 14:30:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Blue-Prism-How-to-calculate-text-date-times/m-p/63508#M2551</guid>
      <dc:creator>Digital_WorkerB</dc:creator>
      <dc:date>2019-08-05T14:30:00Z</dc:date>
    </item>
    <item>
      <title>RE: Blue Prism How to calculate text date times?</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Blue-Prism-How-to-calculate-text-date-times/m-p/63509#M2552</link>
      <description>There are several ways to accomplish what you are trying to do. But I think the easiest approach will be as follows...&lt;BR /&gt;&lt;BR /&gt;Assumptions: [Date String 1] and&amp;nbsp;[Date String 2] are Text data items, containing the values "&lt;SPAN&gt;11/3/2017 12:00:00 AM" and "3/31/2017 12:00:00 AM" respectively&lt;/SPAN&gt;.&amp;nbsp;[Date 1] and&amp;nbsp;[Date 1] are Date data items.&lt;BR /&gt;&lt;BR /&gt;
&lt;UL&gt;
&lt;LI&gt;Use a Multi Calc stage to convert the Text data items containing the date strings to data items of Date type
&lt;UL&gt;
&lt;LI&gt;Example:&amp;nbsp;
&lt;UL&gt;
&lt;LI&gt;Assign the result of &lt;EM&gt;ToDate(Trim([Date String 1]))&lt;/EM&gt; to [Date 1]&lt;/LI&gt;
&lt;LI&gt;Assign the result of &lt;EM&gt;ToDate(Trim([Date String 2]))&lt;/EM&gt; to [Date 2]&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI&gt;Use a Calc stage to execute the DateDiff function on the Date type data items populated from the previous step
&lt;UL&gt;
&lt;LI&gt;Example:
&lt;UL&gt;
&lt;LI&gt;DateDiff(9, [Date 2], [Date 1]) will yield 217 days&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Darrell Coleman&lt;BR /&gt;Digital Exchange Technical Reviewer&lt;BR /&gt;Blue Prism&lt;BR /&gt;America/New_York&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Aug 2019 20:59:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Blue-Prism-How-to-calculate-text-date-times/m-p/63509#M2552</guid>
      <dc:creator>DarrellColeman</dc:creator>
      <dc:date>2019-08-12T20:59:00Z</dc:date>
    </item>
  </channel>
</rss>

