Hi Helaria,
Here's a way of achieving what you want, hopefully it can help you.
So first we need a way to extract the day, month and year from your text data item:
Right([Data1], 2) - We are extracting the day here
Left([Data1], 4) - We are extracting the year
Mid([Data1], 5, 2) - We are extracting the month
Then we need to make it a date:
MakeDate(Right([Data1], 2), Mid([Data1], 5, 2), Left([Data1], 4))Then lastly we put it all together and format the date (The below expression is what you'll use in your calc stage):
FormatDate(MakeDate(Right([Data1], 2), Mid([Data1], 5, 2), Left([Data1], 4)), "yyyy/MM/dd")
There might be simpler ways of achieving this.
I hope it helps you
Thank you
------------------------------
Shuaib Salie
------------------------------
Original Message:
Sent: 09-15-2022 14:03
From: Helaria Shaningwa
Subject: How to write 20220915 as 2022/09/15
Good day
Can you please help me out as i am new to blue prism.
How can i write this data item value "20201015" as 2020/10/15?. This value i am getting it from a business object as it is by using a read stage. I tried using split text and extract regex values but no difference.
This value "20221015" is read and stored in the data Item as Text.
FomatDate did also not work.
------------------------------
Helaria Shaningwa
RPA Intern
------------------------------