-14

i want to find just time not date from my computer current time and also find just "day" e.g., monday , tuesday etc from computer current day. pls tell me as soon as possibe.

ttoseeff
  • 59
  • 2
  • 8

1 Answers1

-1

You can get the Day and Time in DateTime object (datestr). Check datestr object to get more information such as month, year, ShortTimeString.

DateTime datestr = DateTime.Now;
datestr.DayOfWeek; //it shows the day ex: monday,tuesday

datestr.ToLongTimeString(); //restult will be time ex: "10:18:19 PM"
Balaji Marimuthu
  • 1,940
  • 13
  • 13