print time and date on button click

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • reddysankar
    New Member
    • Sep 2007
    • 2

    print time and date on button click

    Hello everyone,

    Is there any statement or code in c# using which i can print the current system time and date on button click.
  • dip_developer
    Recognized Expert Contributor
    • Aug 2006
    • 648

    #2
    Originally posted by reddysankar
    Hello everyone,

    Is there any statement or code in c# using which i can print the current system time and date on button click.
    Date.Now() will give you current Date and Time in the following format....

    9/27/2007 2.29.10 PM

    Comment

    • navneetkaur
      New Member
      • Sep 2007
      • 45

      #3
      Originally posted by reddysankar
      Hello everyone,

      Is there any statement or code in c# using which i can print the current system time and date on button click.
      hi
      jst write like in button click

      DateTime curdate;
      curdate = DateTime.Today. Date.ToShortDat eString();
      crtime = DateTime.Today. Time.Tostring() ;
      it vl display 2dy date

      Comment

      Working...