I have this function...
private string dateConvert(string datDate)
{
System.Globalization.CultureInfo cultEnGb = new System.Globalization.CultureInfo
Can't you use the string.Format
after you've done the conversion?
ie return string.Format("{0:d}", datDate);
I would recommend using the latest C# shorthand (format specifier) for usability and readability's sake:
return dateTimeValue:MM-dd-yyyy;
Clean and concise.
return dateTimeValue.ToString("MM-dd-yyyy");