CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Time Format

  1. #1
    Join Date
    Nov 2011
    Posts
    38

    Time Format

    Is there a way to change the format of midnight to say 2400? When I use time.ToString("HHmm"), it comes up as 0000.

  2. #2
    Join Date
    May 2002
    Location
    Boston
    Posts
    67

    Re: Time Format

    Hi,

    The problem is midnight is 00:00. There is no 24:00.

    You could use the string replace function if the first 2 characters of the time string = "00"

    Curt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured