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).
![]()
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).
![]()
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
@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.
I tried it, and it functions perfectly.Nevertheless, the date formats change when the CSV file is opened in Notepad.
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
The next stage is for other developers to use CSV file(using Notepad option) to read the contents from it.