Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

A small question for a newbie

  1. Nov 25, 2007 #1
    What methods and functions can I use to make the program display or return the current time and date in C#? Thanks.
     
  2. jcsd
  3. Nov 25, 2007 #2
    It's almost embarrassing how many useful hits a quick Google search for "C# time date" yields...
     
  4. Nov 25, 2007 #3
    Thanks, and sorry. I will learn to Google before asking next time.

    Cheers.
     
  5. Nov 26, 2007 #4

    zyh

    User Avatar

    GetlocalTime() can do it
    you can search it in MSDN.
     
  6. Nov 26, 2007 #5

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    Code (Text):
    System.Console.WriteLine(System.DateTime.Now);
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: A small question for a newbie
Loading...