String Values

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 ?

Check this workflow, @Robotics
String_Data_Extraction.xaml (4.7 KB)
Hope this may help you :slight_smile:

2 Likes

Use
Var=08106190
Var=var.substring(0,2)+“/”+var.substring(3,2)+“/”+var.substring(6,2)

1 Like

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 ?

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)

Yes its working fine, Thanks

Welcome
!

You have marked solution to your comment

Happy Automation!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.