An old post, but thought I would add to the discussion in case it helps someone else...
As others have mentioned or alluded to, the date functions in Blue Prism return values according to the Regional Settings on the
local machine. So whatever format you see the date displayed in the Windows Start bar on the bottom right for example is what will be returned to Blue Prism when it requests this from the Windows system.
So, a few things to note on infrastructure:
- Always ensure that your Runtime Resource VDI's are configured in a standard way across your environment (and across Dev, Test, Prod environments!);
- If possible for you in your IT infrastructure, have a standard build template/image that all Runtime Resources are created from;
- Ensure that any Developer machines are also configured to mirror (as closely as possible) the Runtime Resource build.
Finally, if you are hitting these date format issues across different machines I would recommend that when you use the Today() function, store this into a
Date data item first - this is the data type that is returned from the function. By storing it into a Date data item you are assured that a date is a date is a date, and you can use other date manipulation functions more easily as well (DateAdd etc). You can then use the
FormatDate function to format it in whatever presentation format you need at any point - to write a particular format into a target application, or to write the date into a report in a desired format for example.
------------------------------
Jared Rumball
Q4 Associates Ltd
https://www.q4associates.biz/------------------------------