i need to format date like \"2010-04-21 11:35:22.440\". can anyone help me?
the problem is i am seeing either 2009-06-15T13:45:30.0900000 or 2008-03-09 16:05:07Z but not
string formattedDate = dateTime.ToString("yyyy-MM-dd HH\\:mm\\:ss.fff");
Note that the case of MM and HH are important, MM is months, mm is minutes, and HH is 24h, vs hh being 12h.
Also notice the time separator is specified as \:, if you just use : it will use the time separator specified in your regional settings, which may not necessarily be a colon.