Formatting time as a duration?

Discussion in 'ASP .Net Datagrid Control' started by Kris Rudin, Nov 10, 2003.

  1. Kris Rudin

    Kris Rudin Guest

    I have data in a database that lists duration time (hh:mm). If I give it a
    string format of {0:t} (short time), a value of 0:55 (55 minutes) shows up
    as 12:55 AM, and a value of 1:30 (1 hour 30 minutes) shows up as 1:30 AM.

    How can I format this as a true time duration? (It is in the database as
    such...)

    Thanks.
    --
    Kris Rudin, MS, MCP
    Aurora Consulting Group, Inc.
    Kris Rudin, Nov 10, 2003
    #1
    1. Advertising

  2. Hi,

    <%# Convert.ToDateTime(DataBinder.Eval(Container.DataItem,
    "InvOrderDate")).ToString("hh:mm")%>


    The Best Regards,
    Web Developer
    Michael Tkachev

    "Kris Rudin" <> wrote in message
    news:OZ#FrM#...
    > I have data in a database that lists duration time (hh:mm). If I give it a
    > string format of {0:t} (short time), a value of 0:55 (55 minutes) shows up
    > as 12:55 AM, and a value of 1:30 (1 hour 30 minutes) shows up as 1:30 AM.
    >
    > How can I format this as a true time duration? (It is in the database as
    > such...)
    >
    > Thanks.
    > --
    > Kris Rudin, MS, MCP
    > Aurora Consulting Group, Inc.
    >
    >
    Michael Tkachev, Nov 13, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CJ
    Replies:
    2
    Views:
    572
  2. Replies:
    9
    Views:
    375
  3. rainny

    Count the time duration

    rainny, Mar 23, 2009, in forum: Java
    Replies:
    13
    Views:
    2,596
  4. dave
    Replies:
    3
    Views:
    506
    Gabriel Genellina
    Jun 5, 2010
  5. David Hearn
    Replies:
    1
    Views:
    406
    David Hearn
    Sep 10, 2003
Loading...

Share This Page