Robotics
(Bala)
June 19, 2020, 10:35am
1
Hi Team,
I reading a date value using OCR
Exact date is : 08/06/90
Extracted as : 08106190
I want to remove this 1 and replace with /. We cant do replace function because if
date is 18/06/90 means 1 will be replaced with /.
So how to read the 3rd and 6th character from the end of the date, so that we can
get the value 1 ?
Manish540
(Manish Shettigar)
June 19, 2020, 10:48am
2
Check this workflow, @Robotics
String_Data_Extraction.xaml (4.7 KB)
Hope this may help you
2 Likes
ImPratham45
(Prathamesh Patil)
June 19, 2020, 11:13am
3
Use
Var=08106190
Var=var.substring(0,2)+“/”+var.substring(3,2)+“/”+var.substring(6,2)
1 Like
Robotics
(Bala)
June 19, 2020, 11:30am
4
Given code is working fine when output extracted as 08106190
Now i came across another different output as 8106190
If this is the output how do i change your code ?
ImPratham45
(Prathamesh Patil)
June 19, 2020, 11:33am
5
You can use like this
If var.length=8
Then
Var=var.substring(0,2)+“/”+var.substring(3,2)+“/”+var.substring(6,2)
Else
Var=var.substring(0,1)+“/”+var.substring(2,2)+“/”+var.substring(5,2)
Robotics
(Bala)
June 19, 2020, 11:38am
6
Yes its working fine, Thanks
ImPratham45
(Prathamesh Patil)
June 19, 2020, 11:39am
7
Welcome
!
You have marked solution to your comment
Happy Automation!
system
(system)
Closed
June 22, 2020, 11:39am
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.