I have a to display Date format in this format
Tuesday April 17 6:12:02 2018
I have tried this
class Program
{
static void Main(string[] args)
{
var today = DateTime.Now.AddDays(-1);
var day = today.Day;
var month = today.Month;
var year = today.Year;
Console.WriteLine(today);
Console.WriteLine(day);
Console.WriteLine(month);
Console.WriteLine(year);
var answer = day + "/" + month + "/" + year;
Console.WriteLine(answer);
Console.WriteLine(today);
}
}
How can I get the Month and Day like Tuesday, Wednesday in full text , also can the date be changed to AM and PM... I can get the year and date in int.