Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. how to get system date & Time using c#.net

how to get system date & Time using c#.net

Scheduled Pinned Locked Moved C#
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    poonam jagdale
    wrote on last edited by
    #1

    what ia code for it?

    M N C 3 Replies Last reply
    0
    • P poonam jagdale

      what ia code for it?

      M Offline
      M Offline
      musefan
      wrote on last edited by
      #2

      you just want date and time of system? look at the DateTime class... more specifically the static Now property example...

      TextBox1.Text = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");

      Life goes very fast. Tomorrow, today is already yesterday.

      1 Reply Last reply
      0
      • P poonam jagdale

        what ia code for it?

        N Offline
        N Offline
        Narendra Reddy Vajrala
        wrote on last edited by
        #3

        System.DateTime.Now.Tostring();

        M 1 Reply Last reply
        0
        • N Narendra Reddy Vajrala

          System.DateTime.Now.Tostring();

          M Offline
          M Offline
          musefan
          wrote on last edited by
          #4

          are you sure that will work?

          Life goes very fast. Tomorrow, today is already yesterday.

          1 Reply Last reply
          0
          • P poonam jagdale

            what ia code for it?

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Although you've been given the answer, you really should know this sort of basic stuff, and you should invest in a C# book and work through it before attempting anything more complex than basic exercises and self teaching.

            Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

            M 1 Reply Last reply
            0
            • C Christian Graus

              Although you've been given the answer, you really should know this sort of basic stuff, and you should invest in a C# book and work through it before attempting anything more complex than basic exercises and self teaching.

              Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

              M Offline
              M Offline
              musefan
              wrote on last edited by
              #6

              but how to read a book? should use streamreader? or is there something like the following..

              BookReader br = new BookReader("C# Book");

              also does .Net framework contain books already as i dont want to get my own?

              BookReader br = new BookReader(Books.BasicProgramming);

              :( my code wont compile, please help :laugh: :laugh: :laugh:

              Life goes very fast. Tomorrow, today is already yesterday.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups