i want to generate current date and time in a format like this Mon, 10/08/12 12:29:39 . But when i used a code shown below
DateTime date = DateTime.Now;
i am getting like 10/8/2012 12:29:39 PM , but i actually want a format like Mon, 10/08/12 12:29:39 , what change in this code i can use to get the desired output.
I did this code also ,but didnt success
string format = "MMM ddd d HH:mm yyyy"; // Use this format
Console.WriteLine(time.ToString(format));
1 Answer