I have the following code:
string textTransDate = String.Format("{0}-{1}-{2} {3}:{4}", DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute);
I want to add leading zeroes to the month and day parameters if they are less than 10, how would I accomplish this?
More info here:
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx