DateTime span

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

    DateTime span

    How do I calculate the number of days (or hours, or minutes, etc) between
    two DateTime's ?


  • Ravi Ambros Wallau

    #2
    Re: DateTime span

    Subtract one from the other.
    The result of this operation is a TimeSpan object (operator - (less) is
    overloaded)...

    --
    Ravi Ambros Wallau
    r w a l l a u @ s p r i n g w i r e l e s s . n e t

    "JezB" <jezbroadsword@ blueyonder.co.u k> wrote in message
    news:OJp3Wq5WFH A.2420@TK2MSFTN GP12.phx.gbl...[color=blue]
    > How do I calculate the number of days (or hours, or minutes, etc) between
    > two DateTime's ?
    >[/color]


    Comment

    • Marinus Holkema

      #3
      RE: DateTime span

      DateTime1 - DateTime2 results in a TimeSpan structure. This structure allows
      you the represent the timespan in hour, seconds, ticks days. etc

      "JezB" wrote:
      [color=blue]
      > How do I calculate the number of days (or hours, or minutes, etc) between
      > two DateTime's ?
      >
      >
      >[/color]

      Comment

      Working...