The top answer tells you everything you need to know and has a bunch of useful links. See also: http://stackoverflow.com/questions/5601160/custom-date-time-format, http://stackoverflow.com/questions/3717272/datetimeformat-issue/3717339#3717339. Also **search** the site for: http://stackoverflow.com/search?q=c%23+date+format
– KevJul 25 '11 at 22:49
1
Do you mean "yyyy-MM-dd HH:mm:ss" - or are you asking for the method call - if so that's pretty damn lazy!
– James GauntJul 25 '11 at 22:49
Looks like you're pretty close to the right format string in your question title, +/- some capital/lowercase.
– JohnJul 25 '11 at 22:52
@Merlin - I did Google it and did not find a useful resource. Figure I would ask since this has always been a helpful resource.
– Michael KniskernJul 25 '11 at 22:59
3 Answers3
11
here is a pretty good string formatting reference. for your question, you want something like this: