Answers for "date variable in c#"

C#
6

c# date

using System;
class Test {
   static void Main() {
      //print current datetime
      Console.WriteLine (DateTime.Now.ToString());
      //make a custom datetime
      DateTime dt = new DateTime(2018, 7, 24);
      Console.WriteLine (dt.ToString());
   }
}
Posted by: Guest on June-06-2020
1

c# set datetime

var date1 = new DateTime(2008, 5, 1, 8, 30, 52);
Console.WriteLine(date1);
Posted by: Guest on August-13-2020
-1

instantiate date time variable C#

DateTime dtDate = new DateTime(2020,1,1);
Posted by: Guest on August-24-2020

C# Answers by Framework

Browse Popular Code Answers by Language