String Manipulation : Shows Wrong Date when try to extract Date from PDF file

Hi, I have a pdf of Appointment Lettter of new employees, i want to display their details :
A. Designation :QA Analyst
B. DateofJoining :31Jan,2020
C. Location :Bangalore
D. CTC :INR3,40,000/
E. Performance Bonus :INR64,000/-per annum
I have used below expression in Assign Activity:
Location = pdfData.Substring(pdfData.IndexOf(“C. Location :”)+“C. Location :”.Length).Split(Convert.ToChar(vblf))(0)
Which works fine all of the above, except Date of Joining.
dateofJoining = pdfData.Substring(pdfData.IndexOf(“B. DateofJoining :”)+“B. DateofJoining :”.Length).Split(Convert.ToChar(vblf))(0)
Output : - 31 July 2007 instead of 31, Jan, 2020
Thanks for your help, in this regard.

@Sudhir_P It worked fine for me with your logic
image

Thanks for trying, bit strange, I don’t know why , it still shows 31July 2017. I restared Uipath Application, selected different PDF file of same format, but still no luck.

I just realized there are another Date on the letter which is 31 July 2007,
I changed the index value to 10 instead of 0, now it works. Thanks for your help.

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