What are the methods and functions for displaying current time and date in C#?

  • Thread starter Thread starter CodeMonkey
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 3K views
CodeMonkey
Messages
11
Reaction score
0
What methods and functions can I use to make the program display or return the current time and date in C#? Thanks.
 
Physics news on Phys.org
It's almost embarrassing how many useful hits a quick Google search for "C# time date" yields...
 
Thanks, and sorry. I will learn to Google before asking next time.

Cheers.
 
GetlocalTime() can do it
you can search it in MSDN.