How to extract date from a pdf file and load that into a data table(which is Created with build activity with a datatype column as DateTime) by using GetAttribute Activity.
It is giving me : Get attribute ‘XXXXX’ : String was not recognized as a valid DateTime.Couldn’t store <30/04/2018> in Column. Expected type is DateTime.
Steps
1.Use Read PDF text with OCR and store it in a string variable
2.Based on the string variable you can use substring
3.Use Build Data Table
4.Add Data row
But the date is not a plain text in the PDF it is a Field.
so I’m using GetAttribute property to extract the date from that field.
Please note that the destination where I need to save is in a DataTable that has Column with datatype as DateTime.
I tried using the GetAttribute Property with Attribute as “Date” and “DateTime”.
It is not working and I’m getting error as : Message: Attribute not supported by the current UiNode.
So I have used Get Attribute with Attribute as “Text” and now I’m getting error as : Get attribute ‘XXXXX’ : String was not recognized as a valid DateTime.Couldn’t store <30/04/2018> in Column. Expected type is DateTime.
I need the GetAttribute activity to sucessfully extract the date from the pdf fileld and save that to a datatable cell that has column with datatype as DATETIME