doubt

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Baskar RajaSekharan

    doubt

    Hi,

    How to get the Time in C-Sharp. the for mate is like hh:mm:ss. can you
    please give me the sample code.

    Regards,
    R.Baskar





  • Jon Skeet [C# MVP]

    #2
    Re: doubt

    Baskar RajaSekharan <rbk@srasys.co. in> wrote:[color=blue]
    > How to get the Time in C-Sharp. the for mate is like hh:mm:ss. can you
    > please give me the sample code.[/color]

    Use DateTime.Now or DateTime.UtcNow to get the date, and then use its
    ToString method with the appropriate format (e.g. "hh:mm:ss" or
    "HH:mm:ss") .

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    Working...