31-10-23 01:18 PM
I need to write two dates into a text field in the format dd.MM.yyyy. The start date should be the nearest previous 15th, and the end date should be today's date. Any tips on how to do this in Blue Prism? Your advice would be a big help! Thanks!
Answered! Go to Answer.
01-11-23 03:51 PM
@MichealCharron - My bad - This scenario slipped out of my testing mind, thanks for pointing this out and correcting. Cheers !!
02-11-23 09:54 PM
Hi Mike,
That was nice catch, I was about to correct the same.
But still, I think I'll just share my approach as well, which I think is Simpler and correct in one scenario!
AddMonths(ToDate(FormatDate(Today(), "MM/15/yyyy")), -1)
ToDate(FormatDate(Today(), "MM/15/yyyy")
The one scenario is that Blue Prism works on mm/dd/yyyy format and ToDate("15/10/2023") will fail. (Do let me know what you think)
Hope this Helps!
03-11-23 02:14 PM
The hard coded value...nice.
As an aside; most people don't realize that you can put almost anything in the string for a "Format" parameter in the FormatDate() function. Even formatting characters can be used in the string to represent their literal values as long as they are enclosed in double quotes.
For eg., the following string would be unusable to come out with a folder structure from a single FormatDate() function:
------------------------------
Micheal Charron
Senior Manager
RBC
America/Toronto
------------------------------