J Joe Feb 4, 2006 #1 I need to format the DateTime into such format "yyyymmdd HH:mm" how do you do that?
B Bruce Wood Feb 4, 2006 #2 DateTime myDateTime = DateTime.Now; Console.WriteLine(myDateTime.ToString("yyyymmdd HH:mm"); as per http://msdn.microsoft.com/library/d...ml/frlrfsystemdatetimeclasstostringtopic3.asp
DateTime myDateTime = DateTime.Now; Console.WriteLine(myDateTime.ToString("yyyymmdd HH:mm"); as per http://msdn.microsoft.com/library/d...ml/frlrfsystemdatetimeclasstostringtopic3.asp
J john smith Feb 4, 2006 #3 Joe said: I need to format the DateTime into such format "yyyymmdd HH:mm" how do you do that? Click to expand... Console.WriteLine(String.Format("{0:yyyyMMdd HH:mm}", DateTime.Now))
Joe said: I need to format the DateTime into such format "yyyymmdd HH:mm" how do you do that? Click to expand... Console.WriteLine(String.Format("{0:yyyyMMdd HH:mm}", DateTime.Now))
S Sonu Kapoor Feb 5, 2006 #4 Check out: http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=181 Sonu Kapoor [MVP]