07-07-24 01:25 AM
07-07-24 12:37 PM
Hi @jacobitwaco
I have attached screenshot for your ref, Please check it will help you.
Thanks
Nilesh
07-07-24 09:21 PM - edited 07-07-24 09:26 PM
Hi @jacobitwaco ,
Since, you have mentioned that you even used a comma as a separator in your expression before which is actually the right way, I am pretty sure this issue is because of your regional format which pretty often confuses a lot of people.
The FormatDate function in Blue Prism is primarily dictated by the regional settings of the machine it's running on. If your system's default date separator is a hyphen (-), then Blue Prism will use that separator despite the specified format which you would use which in your case is forward slash (/). If your regional setting already has '/' characters then you normally can use the expression as I showed below without any extra Replace function otherwise you will need to update the expression a bit.
As you can see in my case, the regional format of my machine is dd-MM-yyyy:
So here, even if I use the correct calculation function, still it would not work:
FormatDate([Departing Date], "dd/MM/yyy")
The way to avoid this is to either change your regional settings which in most cases would not be advised as it will affect a lot of applications like excel for instance on your machine. Hence, better approach is to use an updated version of the formula which will manually replace the hyphen (-) characters with forward slash (/) characters once you use FormatDate function:
Replace(FormatDate([Departing Date], "dd/MM/yyy"), "-", "/")