Abhi4
(Abhi)
March 11, 2024, 5:50pm
1
Hello Everyone,
Please help me to resolve this issue.
I have CSV file created by BOT . Cell B1 (“dd/MM/yyyy”) is having correct date format which is required.
But when the CSV file is opened with notepad value in B1 cell is changing to (d/M/yyyy).
Anil_G
(Anil Gorthi)
March 11, 2024, 6:28pm
2
@Abhi4
That is how dates are stored…the look you see on excel is because of formatting and all…what is see on notepad is the way ot stores
Cheers
You can try to change the date format in excel when you open it.
Or you can store it as text in csv by writing it in “”
Hi,
You can convert your date to d/M/yyyy to dd/MM/yyyy
DateTime.ParseExact(yourDateString, “d/M/yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)
Thanks
Abhi4
(Abhi)
March 12, 2024, 9:13am
5
@Anil_G ,
Thank you for the reply.
I want to reflect the same date format in notepad as well because BOT generated CSV file as end result .
The next stage is for other developers to use CSV file(using Notepad option) to read the contents from it.
Abhi4
(Abhi)
March 12, 2024, 9:15am
6
@Jayesh_678 ,
I tried it, and it functions perfectly.Nevertheless, the date formats change when the CSV file is opened in Notepad.
1 Like
Hi,
Once CSV file copied on notepad, then read notepad, use generate data table activity to store the notepad data in datatable.
Then use below linq toconvert date format d/M/yyyy to dd/MM/yyyy
DateTime.ParseExact(yourDateString, “d/M/yyyy”, System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)
Finally write the data in notepad.
Thanks
Abhi4
(Abhi)
March 12, 2024, 9:21am
8
@Jayesh_678 ,
The next stage is for other developers to use CSV file(using Notepad option) to read the contents from it.