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. Time Format

Time Format

Scheduled Pinned Locked Moved C#
tutorial
6 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
    somagunasekaran
    wrote on last edited by
    #1

    Hi ALL, I need only Time format in Textbox..So please..How to do.. Regards Somasundaram G

    S N P 3 Replies Last reply
    0
    • S somagunasekaran

      Hi ALL, I need only Time format in Textbox..So please..How to do.. Regards Somasundaram G

      S Offline
      S Offline
      Syed Shahid Hussain
      wrote on last edited by
      #2

      Hello Give me the complete detail? If u wnat to put time in a text box then simply change the format using DateTime class and then assigned to text box. Simple. ;)

      Syed Shahid Hussain

      S 1 Reply Last reply
      0
      • S Syed Shahid Hussain

        Hello Give me the complete detail? If u wnat to put time in a text box then simply change the format using DateTime class and then assigned to text box. Simple. ;)

        Syed Shahid Hussain

        S Offline
        S Offline
        somagunasekaran
        wrote on last edited by
        #3

        I need Time Format like this 06:30:40 in TextBox.So pls.. I want to join in the website

        G 1 Reply Last reply
        0
        • S somagunasekaran

          I need Time Format like this 06:30:40 in TextBox.So pls.. I want to join in the website

          G Offline
          G Offline
          ginji20
          wrote on last edited by
          #4

          if you put in the textbox.. here's the code... textBox1.Text = DateTime.Now.ToLongTimeString(); if you want the seconds to move like a digital clock use timer with it..

          1 Reply Last reply
          0
          • S somagunasekaran

            Hi ALL, I need only Time format in Textbox..So please..How to do.. Regards Somasundaram G

            N Offline
            N Offline
            Nouman Bhatti
            wrote on last edited by
            #5

            System.DateTime dTime = new System.DateTime(2001, 5, 16, 3, 2, 15); // If the current culture is "en-US", // longDateString gets "Wednesday, May 16, 2001" string longDateString = dTime.ToLongDateString(); // If the current culture is "en-US", // longTimeString gets "3:02:15 AM" string longTimeString = dTime.ToLongTimeString(); or u can use DateTime.ToShortTimeString() method

            1 Reply Last reply
            0
            • S somagunasekaran

              Hi ALL, I need only Time format in Textbox..So please..How to do.. Regards Somasundaram G

              P Online
              P Online
              PIEBALDconsult
              wrote on last edited by
              #6

              Use a DateTimePicker.

              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