dlively1/SugarSharp

Date / DateTime Format Extension method

Closed this issue · 0 comments

Create an extension method on the DateTime object that formats the string to the proper format for SugarCRM.

Example Format:

string dateString = "2007-09-04 08:00:00";
DateTime dt = Convert.ToDateTime(dateString);
string dtString = dt.ToString("yyyy-MM-dd");