If 'dt' represents your DateTime instance, then this will give you the format you need:

string date = dt.ToString("yyyy-MM-dd HH:mm:ss");