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
  1. Home
  2. General Programming
  3. C#
  4. how to display current time.

how to display current time.

Scheduled Pinned Locked Moved C#
helptutorialquestion
5 Posts 5 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.
  • S Offline
    S Offline
    sudhir behera
    wrote on last edited by
    #1

    hi, i am having problem in date time function while i am doing windows application.i am always getting date along with constant time 12:00:00AM.Which i dont want it.i want the exact time .plz give me some idea how can i do this in windows application. THANKS IN ADVANCE.

    H A D L 4 Replies Last reply
    0
    • S sudhir behera

      hi, i am having problem in date time function while i am doing windows application.i am always getting date along with constant time 12:00:00AM.Which i dont want it.i want the exact time .plz give me some idea how can i do this in windows application. THANKS IN ADVANCE.

      H Offline
      H Offline
      Harvey Saayman
      wrote on last edited by
      #2

      DateTime.Now;

      Harvey Saayman - South Africa Software Developer .Net, C#, SQL you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming) 1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111

      1 Reply Last reply
      0
      • S sudhir behera

        hi, i am having problem in date time function while i am doing windows application.i am always getting date along with constant time 12:00:00AM.Which i dont want it.i want the exact time .plz give me some idea how can i do this in windows application. THANKS IN ADVANCE.

        A Offline
        A Offline
        Abhinav S
        wrote on last edited by
        #3

        Where are you getting this date time value from? If it is from a database, then you may need to correct this in your query.

        1 Reply Last reply
        0
        • S sudhir behera

          hi, i am having problem in date time function while i am doing windows application.i am always getting date along with constant time 12:00:00AM.Which i dont want it.i want the exact time .plz give me some idea how can i do this in windows application. THANKS IN ADVANCE.

          D Offline
          D Offline
          Dr Walt Fair PE
          wrote on last edited by
          #4

          I'm not sure I understand. DateTime.Now will get the current date and time from the system. If you just want the time part and not the date, then you can use DateTime.TimeOfDay. A good summary of time and Date handling in .NET is at http://dotnetperls.com/datetime-1[^]

          CQ de W5ALT

          Walt Fair, Jr., P. E. Comport Computing Specializing in Technical Engineering Software

          1 Reply Last reply
          0
          • S sudhir behera

            hi, i am having problem in date time function while i am doing windows application.i am always getting date along with constant time 12:00:00AM.Which i dont want it.i want the exact time .plz give me some idea how can i do this in windows application. THANKS IN ADVANCE.

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            show code! :)

            Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


            Prolific encyclopedia fixture proof-reader browser patron addict?
            We all depend on the beast below.


            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