gjshah7254
7/8/2015 - 9:07 PM

C# dateformat convert to SQL Date in a string

C# dateformat convert to SQL Date in a string

DateTime myDateTime = DateTime.Now;
string sqlFormattedDate = myDateTime.ToString("yyyy-MM-dd HH:mm:ss");