Hi there.
I have a small problem. I read a CSV file and keep it in a DataTable:
Then I paste this Data Table using Excel activity
The problem is that my DataTable is giving me the RIGHT output format:
And in my Excel file, the format is not good…
How can I keep the correct date format? Knowing that I want in French format DD/MM/YYYY?
Thanks
Gokul001
(Gokul Balaji)
2
Hi @DimitriLYR
How about this expression
DateTime.ParseExact(YourString,"dd/MM/yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")
Regards
Gokul
Gokul001
(Gokul Balaji)
3
Check out the Video link to change the format in the excel @DimitriLYR
You can try with Studio X activity
https://docs.uipath.com/activities/docs/format-range-x
Regards
Gokul
Hello @DimitriLYR
Try this
DateTime.ParseExact(YourString,"MM/dd/yyyy HH:mm:ss",System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")
or
DateTime.ParseExact(YourString,"MM/dd/yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd/MM/yyyy")
Thank you so much. Very nice !
Where you need to put this expression as he said he is directly copy from datatable to excel ?
system
(system)
Closed
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.