Change date to text

Hi guys!

I have a process that reads PDF files and writes them to Excel. In the date, I need it to be “dd/mm/yy” in text format.

I tried changing 2022 to 22, but although visually the system takes it the way I want, when I copy and paste it to the ERP, it does so with the “dd/mm/yyyy” format.

I currently replace it manually using the function:

original datatable

desired format


What I can do? Thank you!!

Hi [carlos sabino,

You can use for each row
and put function
VarDate = “27/06/2022”
outDate = Datetime.ParseExact(VarDate,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture)

where outDate and Finaldate is a Datatype of system.Datetime.


Hello @carlos_sabino

In the excel to which you are writing, keep the format of the excel column as “dd/mm/yy”.

Go to format->custom format and select the required date format. Then if you write it will work as expected.


1 Like