<?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: Even Out Date Format in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84775#M35868</link>
    <description>&lt;A class="user-content-mention" data-sign="@" data-contactkey="eb276a25-5d88-4fe6-85c0-2924ed9bbc97" data-tag-text="@Shomesh" href="https://community.blueprism.com/network/profile?UserKey=eb276a25-5d88-4fe6-85c0-2924ed9bbc97" data-itemmentionkey="6779f53c-73b6-44ab-9312-d030dab7ee8f"&gt;@Shomesh&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Darn, I was hoping you weren't going to ask me that. The method I would use involves extracting Excel data using Blue Prism's "Data - OLEDB" VB​O (which I use where there is a complicated Excel extraction scenario) and Blue Prism's "Utility - Strings" VBO to test what formats we are dealing with. Bear with me on this one because there is a fair amount of the Alphabet to go through.&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28767.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28900i92CDE7CC450E9A90/image-size/large?v=v2&amp;amp;px=999" role="button" title="28767.png" alt="28767.png" /&gt;&lt;/span&gt;&lt;SPAN style="color: #ff0000; font-size: 8pt;"&gt;Aside: We try to format our processes vertically but I am using what our group calls the "caribou" format so that it will fit easily into an image.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-size: 14pt;"&gt;&lt;STRONG&gt;(A) &lt;/STRONG&gt;&lt;/SPAN&gt;First off, we set up the Provider string in a data item with the following string to use the with the ACE driver (free with the MS Access Database Engine Redistributable if it isn't already installed):&lt;BR /&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;Microsoft.ACE.OLEDB.12.0;Extended Properties="Excel 12.0;HDR=YES;READONLY=TRUE"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Version numbers will vary depending on the version of the ACE driver you have and the version of Excel&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(B)&lt;/SPAN&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;Use the "Set Connection" action in the "Data - OLEDB" VBO to connect the OLEDB to the Excel (in this case, it is my example in the previous reply):&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28768.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28896i83DE67A6CD033EF5/image-size/large?v=v2&amp;amp;px=999" role="button" title="28768.png" alt="28768.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;The Database parameter is the full path to your Excel file. The provider parameter was that data item we set up in (A).&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(C)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;Use the "Get Collection" action in &lt;SPAN style="color: #008000;"&gt;&lt;SPAN style="color: #008000;"&gt;&lt;SPAN style="color: #000000;"&gt;the "Data - OLEDB" VBO to quickly grab a sample of the current date format in the source Excel:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28769.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28897i204AED6FBEFEFD28/image-size/large?v=v2&amp;amp;px=999" role="button" title="28769.png" alt="28769.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
The SQL selects the first value within the "Column Date" column in the worksheet named "Data" (the FROM uses the worksheet name with a "$" appended to it).&lt;BR /&gt;​&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(D)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; We now have a sample format to look at and determine which format is used for dates in the Excel.&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28770.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28902i6B502E09A42313F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="28770.png" alt="28770.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(E)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; Luckily, the four formats that you listed each have their own unique format that makes it easy to determine which format has month and day in which position in the string. We can determine which format we have to work with by calling the "Test Regex Match" action in the "Utility - Strings" VBO up to four times:&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28771.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28899i9FB37D525E18AE17/image-size/large?v=v2&amp;amp;px=999" role="button" title="28771.png" alt="28771.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
We run the regex patterns in each of the "Test Regex Match" actions against the value in the "Target String" parameter the we retrieved from the Excel in &lt;SPAN style="color: #008000;"&gt;(C)&lt;/SPAN&gt; and stored in &lt;SPAN style="color: #008000;"&gt;(D)&lt;/SPAN&gt;. The four "Test Regex Match" actions are exactly the same except for the "Regex Pattern" parameter that needs to test the four different date formats.&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;
&lt;TABLE style="border-color: #909090; border-style: solid; border-collapse: collapse; border-spacing: 0px; height: 139px;" tbody=""&gt;
&lt;TBODY&gt;
&lt;TR style="height: 45px;"&gt;
&lt;TH style="color: #505050; background-color: #e6f8fa; padding: 6px; text-align: center; height: 45px; width: 114px;"&gt;
&lt;P&gt;&lt;STRONG&gt;Date Format&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD style="background-color: #e6f8fa; padding: 2px; text-align: center; vertical-align: middle; height: 45px; width: 194px;"&gt;
&lt;P&gt;&lt;STRONG&gt;Regex Pattern&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 23px;"&gt;
&lt;TD style="padding: 2px; text-align: left; vertical-align: middle; height: 23px; width: 114px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; MM/dd/yyyy&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD style="padding: 2px; text-align: center; vertical-align: middle; height: 23px; width: 194px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"\d{2}/\d{2}/\d{4}$"&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14px;"&gt;
&lt;TD style="padding: 2px; text-align: left; vertical-align: middle; height: 14px; width: 114px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; dd/MM/yy&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD style="padding: 2px; text-align: center; vertical-align: middle; height: 14px; width: 194px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"\d{2}/\d{2}/\d{2}$"&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 19px;"&gt;
&lt;TD style="padding: 2px; text-align: left; vertical-align: middle; height: 19px; width: 114px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; dd-MM-yyyy&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD style="padding: 2px; text-align: center; vertical-align: middle; height: 19px; width: 194px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"\d{2}-\d{2}-\d{4}$"&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 38px;"&gt;
&lt;TD style="padding: 2px; text-align: left; vertical-align: middle; height: 38px; width: 114px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; MM-dd-yy&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD style="padding: 2px; text-align: center; vertical-align: middle; height: 38px; width: 194px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"\d{2}-\d{2}-\d{2}$"&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(F)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; The testing for regular expression matches &lt;SPAN style="color: #008000;"&gt;(E)&lt;/SPAN&gt; always returns a True or False into the "Matched?" data item.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(G)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; The "Format Match?" decisions branch off depending whether the current value of the "Matched?" data item &lt;SPAN style="color: #008000;"&gt;(F)&lt;/SPAN&gt; is True or False.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(H)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; An exception stage is thrown in for good measure if none of the format's match.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(I)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; I'm going to assume, by your question, that your standard date format does not start with the year first. Bearing that in mind, two of the four formats can be directly converted into the system's date format and the other two cannot. In my case having the day first will through off direct date conversion so for those date formats, I want to create an expression to place into my next SQL query to reformat the string so that it can convert directly. For this, I can use the "Date Reformat" calculation stage to format a string as an ACE SQL expression:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28772.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28901i090FB6CE62B46D1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="28772.png" alt="28772.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;The expression string will take the middle two numbers, add a "/", add the first two numbers, add a "/" and then add the last two number of the year.&lt;/P&gt;
&lt;PRE class="language-vbnet"&gt;&lt;CODE&gt;"MID([Column Date],4,2)+""/""+LEFT([Column Date],2)+""/""+RIGHT([Column Date],2)"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(J)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; If you are looking for the &lt;SPAN style="color: #008000;"&gt;(J)&lt;/SPAN&gt; step in the process image, there isn't one. I missed it when inserting the letters and I'm not going to go back and change the process image.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(K)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; Since the second set of date formats can be directly converted into a date, I use the "Date Pass-Thru" calculation stage to create a string with the name of the date column in the Excel:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28773.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28903i78CF6BFB8A8017CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="28773.png" alt="28773.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(L)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; The "Reformat Date Formula" data item now holds either an expression for switching the numbers around in the Excel date column or just the column name in the Excel date column.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(M)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; Here is where the magic starts to happen. I've set up a data item that contains a SQL query that will retrieve all the columns in the worksheet "Data" in the Excel but also has a formula and placeholder for the date column to convert it into a date and then format it in any date format we want (in this case "MMM d, yyyy"):&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28774.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28905i0E4774F99CEE584E/image-size/large?v=v2&amp;amp;px=999" role="button" title="28774.png" alt="28774.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;PRE class="language-sql"&gt;&lt;CODE&gt;SELECT [Column 1]
, [Column 2]
, FORMAT(CDATE(@DateReformat),"MMM d, yyyy") AS [Column Date]
, [Column 4] 
FROM [Data$]&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This takes whatever is put in place of the place holder "@DateReformat", converts it to a date using the function "CDATE" and then take that date and format it as "MMM d, yyyy"&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(N)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; Here is where the magic ends. Using the "Get Collection" action from the "Data - OLEDB" VBO again, we do a quick replace of the "@DateReformat" placeholder we have in the "SQL Query" data item &lt;SPAN style="color: #008000;"&gt;(M)&lt;/SPAN&gt; with the string we have in the "Reformat Date Formula" data item &lt;SPAN style="color: #008000;"&gt;(L)&lt;/SPAN&gt; before we pass it into the "SQL" parameter:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28775.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28904i90C77A3CC192183E/image-size/large?v=v2&amp;amp;px=999" role="button" title="28775.png" alt="28775.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(O)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; What we end up with is all the data in the Excel along with reformatted date data being brought directly into your Blue Prism collection:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28776.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28906i2D234B5B1DCF3D97/image-size/large?v=v2&amp;amp;px=999" role="button" title="28776.png" alt="28776.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Micheal Charron&lt;BR /&gt;Senior Manager&lt;BR /&gt;RBC&lt;BR /&gt;America/Toronto&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Fri, 22 Jul 2022 19:05:00 GMT</pubDate>
    <dc:creator>MichealCharron</dc:creator>
    <dc:date>2022-07-22T19:05:00Z</dc:date>
    <item>
      <title>Even Out Date Format</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84770#M35863</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, BOT is processing approx. 5 excel files per day. Each file have a column with date field. Date field is not consistent in all the files. Possibility:&amp;nbsp; File 1: Date format - mm/dd/yyyy File 2: Date format - dd/mm/yy File 3: Date format - DD-MM-YYYY File 4: Date format - mm-dd-yy. We are using "FormatDateTime (Date, DateFormat)"&amp;nbsp;&amp;nbsp;to get date in one unique format. But since date field format varies for each file, BOT may produce wrong result or may throw an exception. Is there a way BOT can sense date format from excel file and parse it into desired format without any error? &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Shomesh&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Jul 2022 10:44:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84770#M35863</guid>
      <dc:creator>Shomesh</dc:creator>
      <dc:date>2022-07-19T10:44:00Z</dc:date>
    </item>
    <item>
      <title>RE: Even Out Date Format</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84771#M35864</link>
      <description>@Shomesh&lt;BR /&gt;&lt;BR /&gt;Are the cells, in the date column in each file, formatted as text (with the apostrophe) or are they Excel date cells that have been formatted with a date format?&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Micheal Charron&lt;BR /&gt;Senior Manager&lt;BR /&gt;RBC&lt;BR /&gt;America/Toronto&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Jul 2022 12:00:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84771#M35864</guid>
      <dc:creator>MichealCharron</dc:creator>
      <dc:date>2022-07-19T12:00:00Z</dc:date>
    </item>
    <item>
      <title>RE: Even Out Date Format</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84772#M35865</link>
      <description>If the cells in the date column are Excel date cells formatted with a date format, there is a relatively easy way to reformat the dates to a format that we can work with because the underlying data is a date serial number. If we take the example data show below:&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28740.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28871i2359D8FE4F762987/image-size/large?v=v2&amp;amp;px=999" role="button" title="28740.png" alt="28740.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;We can use the "Format Cell" action in the "MS Excel VBO" VBO to format all the dates in column "C" to the format we need. Although the action's name implies that you can only format one cell, you can actually format a range of cells with it. In the "Cell Reference" parameter you can specify "C:C" to format all used cells in the "C" column.&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28741.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28869i9698B5A91A244A4A/image-size/large?v=v2&amp;amp;px=999" role="button" title="28741.png" alt="28741.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;Then use any of the actions to pull the data from Excel into a Blue Prism collection. In this example, we had formatted the dates as "MMM d, yyyy".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28742.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28874i4267B3A42252F23C/image-size/large?v=v2&amp;amp;px=999" role="button" title="28742.png" alt="28742.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Micheal Charron&lt;BR /&gt;Senior Manager&lt;BR /&gt;RBC&lt;BR /&gt;America/Toronto&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Jul 2022 03:01:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84772#M35865</guid>
      <dc:creator>MichealCharron</dc:creator>
      <dc:date>2022-07-20T03:01:00Z</dc:date>
    </item>
    <item>
      <title>RE: Even Out Date Format</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84773#M35866</link>
      <description>&lt;P&gt;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/548"&gt;@MichealCharron&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Thanks. The approach you suggested works great if the date field in the excel is in Date format​ rather if the field is text format how can I proceed that.&lt;/P&gt;
&lt;P&gt;
&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Shomesh&lt;BR /&gt;------------------------------&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2022 12:23:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84773#M35866</guid>
      <dc:creator>Shomesh</dc:creator>
      <dc:date>2022-07-21T12:23:00Z</dc:date>
    </item>
    <item>
      <title>RE: Even Out Date Format</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84774#M35867</link>
      <description>Hi Shomesh,&lt;BR /&gt;&lt;BR /&gt;For that situation you can always convert text into date format using the Convert date function in a calculation.&lt;BR /&gt;&lt;BR /&gt;Then if the date isn't in the right order you can use the FormatDate function as well to put it in the right format.&lt;BR /&gt;&lt;BR /&gt;You can use the above functions in tandem as well to do them at the same time in the picture below.&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28748.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28880i7C1EDC26BD50607E/image-size/large?v=v2&amp;amp;px=999" role="button" title="28748.png" alt="28748.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Ronan Considine &lt;BR /&gt;Senior Business Analyst&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Jul 2022 15:06:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84774#M35867</guid>
      <dc:creator>RonanConsidine</dc:creator>
      <dc:date>2022-07-22T15:06:00Z</dc:date>
    </item>
    <item>
      <title>RE: Even Out Date Format</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84775#M35868</link>
      <description>&lt;A class="user-content-mention" data-sign="@" data-contactkey="eb276a25-5d88-4fe6-85c0-2924ed9bbc97" data-tag-text="@Shomesh" href="https://community.blueprism.com/network/profile?UserKey=eb276a25-5d88-4fe6-85c0-2924ed9bbc97" data-itemmentionkey="6779f53c-73b6-44ab-9312-d030dab7ee8f"&gt;@Shomesh&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Darn, I was hoping you weren't going to ask me that. The method I would use involves extracting Excel data using Blue Prism's "Data - OLEDB" VB​O (which I use where there is a complicated Excel extraction scenario) and Blue Prism's "Utility - Strings" VBO to test what formats we are dealing with. Bear with me on this one because there is a fair amount of the Alphabet to go through.&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28767.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28900i92CDE7CC450E9A90/image-size/large?v=v2&amp;amp;px=999" role="button" title="28767.png" alt="28767.png" /&gt;&lt;/span&gt;&lt;SPAN style="color: #ff0000; font-size: 8pt;"&gt;Aside: We try to format our processes vertically but I am using what our group calls the "caribou" format so that it will fit easily into an image.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000; font-size: 14pt;"&gt;&lt;STRONG&gt;(A) &lt;/STRONG&gt;&lt;/SPAN&gt;First off, we set up the Provider string in a data item with the following string to use the with the ACE driver (free with the MS Access Database Engine Redistributable if it isn't already installed):&lt;BR /&gt;
&lt;PRE class="language-markup"&gt;&lt;CODE&gt;Microsoft.ACE.OLEDB.12.0;Extended Properties="Excel 12.0;HDR=YES;READONLY=TRUE"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Version numbers will vary depending on the version of the ACE driver you have and the version of Excel&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(B)&lt;/SPAN&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;SPAN style="color: #000000;"&gt;Use the "Set Connection" action in the "Data - OLEDB" VBO to connect the OLEDB to the Excel (in this case, it is my example in the previous reply):&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28768.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28896i83DE67A6CD033EF5/image-size/large?v=v2&amp;amp;px=999" role="button" title="28768.png" alt="28768.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;The Database parameter is the full path to your Excel file. The provider parameter was that data item we set up in (A).&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(C)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;Use the "Get Collection" action in &lt;SPAN style="color: #008000;"&gt;&lt;SPAN style="color: #008000;"&gt;&lt;SPAN style="color: #000000;"&gt;the "Data - OLEDB" VBO to quickly grab a sample of the current date format in the source Excel:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28769.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28897i204AED6FBEFEFD28/image-size/large?v=v2&amp;amp;px=999" role="button" title="28769.png" alt="28769.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
The SQL selects the first value within the "Column Date" column in the worksheet named "Data" (the FROM uses the worksheet name with a "$" appended to it).&lt;BR /&gt;​&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(D)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; We now have a sample format to look at and determine which format is used for dates in the Excel.&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28770.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28902i6B502E09A42313F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="28770.png" alt="28770.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(E)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; Luckily, the four formats that you listed each have their own unique format that makes it easy to determine which format has month and day in which position in the string. We can determine which format we have to work with by calling the "Test Regex Match" action in the "Utility - Strings" VBO up to four times:&lt;BR /&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28771.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28899i9FB37D525E18AE17/image-size/large?v=v2&amp;amp;px=999" role="button" title="28771.png" alt="28771.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
We run the regex patterns in each of the "Test Regex Match" actions against the value in the "Target String" parameter the we retrieved from the Excel in &lt;SPAN style="color: #008000;"&gt;(C)&lt;/SPAN&gt; and stored in &lt;SPAN style="color: #008000;"&gt;(D)&lt;/SPAN&gt;. The four "Test Regex Match" actions are exactly the same except for the "Regex Pattern" parameter that needs to test the four different date formats.&lt;BR /&gt;&lt;BR /&gt;
&lt;DIV style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;
&lt;TABLE style="border-color: #909090; border-style: solid; border-collapse: collapse; border-spacing: 0px; height: 139px;" tbody=""&gt;
&lt;TBODY&gt;
&lt;TR style="height: 45px;"&gt;
&lt;TH style="color: #505050; background-color: #e6f8fa; padding: 6px; text-align: center; height: 45px; width: 114px;"&gt;
&lt;P&gt;&lt;STRONG&gt;Date Format&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TH&gt;
&lt;TD style="background-color: #e6f8fa; padding: 2px; text-align: center; vertical-align: middle; height: 45px; width: 194px;"&gt;
&lt;P&gt;&lt;STRONG&gt;Regex Pattern&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 23px;"&gt;
&lt;TD style="padding: 2px; text-align: left; vertical-align: middle; height: 23px; width: 114px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; MM/dd/yyyy&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD style="padding: 2px; text-align: center; vertical-align: middle; height: 23px; width: 194px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"\d{2}/\d{2}/\d{4}$"&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14px;"&gt;
&lt;TD style="padding: 2px; text-align: left; vertical-align: middle; height: 14px; width: 114px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; dd/MM/yy&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD style="padding: 2px; text-align: center; vertical-align: middle; height: 14px; width: 194px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"\d{2}/\d{2}/\d{2}$"&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 19px;"&gt;
&lt;TD style="padding: 2px; text-align: left; vertical-align: middle; height: 19px; width: 114px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; dd-MM-yyyy&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD style="padding: 2px; text-align: center; vertical-align: middle; height: 19px; width: 194px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"\d{2}-\d{2}-\d{4}$"&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 38px;"&gt;
&lt;TD style="padding: 2px; text-align: left; vertical-align: middle; height: 38px; width: 114px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt; MM-dd-yy&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD style="padding: 2px; text-align: center; vertical-align: middle; height: 38px; width: 194px;"&gt;
&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"\d{2}-\d{2}-\d{2}$"&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(F)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; The testing for regular expression matches &lt;SPAN style="color: #008000;"&gt;(E)&lt;/SPAN&gt; always returns a True or False into the "Matched?" data item.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(G)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; The "Format Match?" decisions branch off depending whether the current value of the "Matched?" data item &lt;SPAN style="color: #008000;"&gt;(F)&lt;/SPAN&gt; is True or False.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(H)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; An exception stage is thrown in for good measure if none of the format's match.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(I)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; I'm going to assume, by your question, that your standard date format does not start with the year first. Bearing that in mind, two of the four formats can be directly converted into the system's date format and the other two cannot. In my case having the day first will through off direct date conversion so for those date formats, I want to create an expression to place into my next SQL query to reformat the string so that it can convert directly. For this, I can use the "Date Reformat" calculation stage to format a string as an ACE SQL expression:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28772.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28901i090FB6CE62B46D1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="28772.png" alt="28772.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;The expression string will take the middle two numbers, add a "/", add the first two numbers, add a "/" and then add the last two number of the year.&lt;/P&gt;
&lt;PRE class="language-vbnet"&gt;&lt;CODE&gt;"MID([Column Date],4,2)+""/""+LEFT([Column Date],2)+""/""+RIGHT([Column Date],2)"&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(J)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; If you are looking for the &lt;SPAN style="color: #008000;"&gt;(J)&lt;/SPAN&gt; step in the process image, there isn't one. I missed it when inserting the letters and I'm not going to go back and change the process image.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(K)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; Since the second set of date formats can be directly converted into a date, I use the "Date Pass-Thru" calculation stage to create a string with the name of the date column in the Excel:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28773.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28903i78CF6BFB8A8017CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="28773.png" alt="28773.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(L)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; The "Reformat Date Formula" data item now holds either an expression for switching the numbers around in the Excel date column or just the column name in the Excel date column.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(M)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; Here is where the magic starts to happen. I've set up a data item that contains a SQL query that will retrieve all the columns in the worksheet "Data" in the Excel but also has a formula and placeholder for the date column to convert it into a date and then format it in any date format we want (in this case "MMM d, yyyy"):&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28774.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28905i0E4774F99CEE584E/image-size/large?v=v2&amp;amp;px=999" role="button" title="28774.png" alt="28774.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;PRE class="language-sql"&gt;&lt;CODE&gt;SELECT [Column 1]
, [Column 2]
, FORMAT(CDATE(@DateReformat),"MMM d, yyyy") AS [Column Date]
, [Column 4] 
FROM [Data$]&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This takes whatever is put in place of the place holder "@DateReformat", converts it to a date using the function "CDATE" and then take that date and format it as "MMM d, yyyy"&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(N)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; Here is where the magic ends. Using the "Get Collection" action from the "Data - OLEDB" VBO again, we do a quick replace of the "@DateReformat" placeholder we have in the "SQL Query" data item &lt;SPAN style="color: #008000;"&gt;(M)&lt;/SPAN&gt; with the string we have in the "Reformat Date Formula" data item &lt;SPAN style="color: #008000;"&gt;(L)&lt;/SPAN&gt; before we pass it into the "SQL" parameter:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28775.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28904i90C77A3CC192183E/image-size/large?v=v2&amp;amp;px=999" role="button" title="28775.png" alt="28775.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #008000;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 14pt;"&gt;(O)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; What we end up with is all the data in the Excel along with reformatted date data being brought directly into your Blue Prism collection:&lt;/P&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1; padding-left: 40px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="28776.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/28906i2D234B5B1DCF3D97/image-size/large?v=v2&amp;amp;px=999" role="button" title="28776.png" alt="28776.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Micheal Charron&lt;BR /&gt;Senior Manager&lt;BR /&gt;RBC&lt;BR /&gt;America/Toronto&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Jul 2022 19:05:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Even-Out-Date-Format/m-p/84775#M35868</guid>
      <dc:creator>MichealCharron</dc:creator>
      <dc:date>2022-07-22T19:05:00Z</dc:date>
    </item>
  </channel>
</rss>

