Paste Collection (Fast) is making a mess of date formats
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
18-01-23 01:54 PM
This process runs for many different reports, and the headers change from one report to another, so hard-coding this to store as Date by default is not possible.
When I use Paste Collection (Fast) to put this data into another spreadsheet, something very strange happens:
Basically, every date from the 1st to the 12th of the month is treated as though it were in the MM/DD/YY format and the date and month are switched, whereas any date from the 13th onwards is correctly formatted as DD/MM/YY.
This is causing an issue when it comes to sorting by date, as all the 3rd of Januarys are being treated as though they were the 1st of March, and so on.
I should point out that this process runs for dozens of reports with thousands of lines, so any solution involving manual adjustments of the format in Excel is a non-starter.
It seems this is an issue with the way the Paste Collection process functions. It assumes dates are in MM/DD/YY unless the month is over 12, in which case it must be DD/MM/YY, resulting in this inconsistent output. I can't stress enough how much nobody wants this. The dates should either all be converted to MM/DD/YYYY (which would be annoying tbh), or they should be left alone. The output from this process is utterly unusable as the dates can not be relied upon.
------------------------------
John Roberts
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
18-01-23 03:20 PM
You could then try to write that collection into the required spreadsheet. As the column is defined as date/time , it might keep the format correct .
------------------------------
Stephen Eric Jones
Blue Prism Developer
Swinton Insurance
Europe/London
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
18-01-23 04:45 PM
------------------------------
John Roberts
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-01-23 06:23 AM
It is possible that the issue is related to the cultural settings of the Excel. The VBO, when opening the Excel document, utilizes the cultural format of the Excel rather than utilizing the local format. This discrepancy can potentially lead to issues if the Excel documents in question originate from regions with different cultural settings. You could test this by modifying the code to use just the local variant of excel.
Edit:
Also, it is worth trying to set the 'Office Authoring language' to something like English India as we use dd/MM/yyyy format.
Thanks
------------------------------
Gopal Bhaire
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-01-23 08:49 AM
I don't know if that would make any difference but something worth trying other than the points mentioned by @GopalBhaire
------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
19-01-23 04:29 PM
Am i correct in assuming that you only need the date and not date time for this? Once its written into the excel file can you use the VBO Excel action Format Cell and set the range of cells to the correct date format?
------------------------------
Michael ONeil
Technical Lead developer
NTTData
Europe/London
------------------------------
