I am trying to save the current date time format from C# and convert it to an SQL Server date format like so yyyy-MM-dd HH:mm:ss so I can use it for my UP
yyyy-MM-dd HH:mm:ss
UP
If you wanna update a table with that DateTime, you can use your SQL string like this example:
int fieldId; DateTime myDateTime = DateTime.Now string sql = string.Format(@"UPDATE TableName SET DateFieldName='{0}' WHERE FieldID={1}", myDateTime.ToString("yyyy-MM-dd HH:mm:ss"), fieldId.ToString());