str.Replace("/", ",");i need to change the format of my date format
from 30/12/2014 to 30,12,2014.
public void ExportToTxtFile(DataTable dt, string filePath)
{
StringBuilder str = new StringBuilder();
str.Append(dt.Rows[i][j].ToString() + ",");
}
str.Replace("/", ","); //how to specify only date time format to change
File.WriteAllText(filePath, str.ToString());
i can use str.Replace("/", ",");
has any good method to specify only date time format can be change?