Check out example codes for "c# set datetime". It will help you in understanding the concepts better.

Code Example 1

var date1 = new DateTime(2008, 5, 1, 8, 30, 52);
Console.WriteLine(date1);

Code Example 2

DateTime dtDate = new DateTime(2020,1,1);

Learn ReactJs, React Native from akashmittal.com