Extract date time from string of PDF file

Hi everyone.

I want to extract the datetime as below picture out of string from PDF file.

How to split and replace to received which I want ?

Thanks you so much!

image

1 Like

Hi @trunghai

-Use Read pdf activity to read the pdf file
-Use Regex to get the particular data

cheers :smiley:

Happy learning :smiley:

5 Likes

hi @trunghai

Do the following steps:

  1. Do a get text from the PDF and can you see what’s coming in from the PDF
  2. See the similarities on how you are getting the text. (Down here I see the “21” always will come after (Day) and “08” before (month) and sooo on
  3. One this is done, use regex expression just to find out the text and use it as per your requirement :slight_smile:

Hope this helps :smiley:
Happy learning

2 Likes

Hi bro @Shubham_Varshney

I have used the command to split “Ngày (Day)” out of string…
How to combine to split other string “tháng (month)” and “năm (year)” out of string and then replace the blank by “/”

“text.substring(text.indexof(“Ngày (Day)”)+“Ngày (Day)”.length).split(environment.newline.tochararray)(0)”

1 Like

Hi @trunghai

you can use this as your referenece.

or if it is ok to you you can share your xaml to easily address the issue.

cheers :smiley:

Happy learning :smiley:

4 Likes

Hi all.

I have splited some strings and received the result : 21 08 2019

But the first of string is double space and between also.

How to replace all of spaces with one “/” character only ?

1 Like

Hi @trunghai

Use strtext.tostring.replace(" “,”/")

Thanks
Ashwin.S

2 Likes

Hi @AshwinS2

Thanks you but between string, it has some spaces… before I have used this command and got the result as below.

I want to replace all of spaces with one “/” only
image

1 Like

Hi @trunghai

Use String.Format for your issue.

cheers :smiley:

Happy learning :smiley:

3 Likes

Thanks you all of you! :slight_smile:

1 Like

No worries @trunghai

Happy to help here!

cheers :smiley:

Happy learning :smiley:

2 Likes

Ahhh I was late in replying :frowning:

If you have any other query, fell free to ask :slight_smile:

2 Likes