Output today's date in long format - CSharp Language Basics

CSharp examples for Language Basics:Date Time

Description

Output today's date in long format

Demo Code

using System;// www . ja  va  2  s  . c o m
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program
{
   static void Main(string[] args)
   {
      // Today's date
      DateTime today = DateTime.Today;
      // Output
      Console.WriteLine("Today is " + today.ToLongDateString());
   }
}

Result


Related Tutorials