Getting Time Differnce

Results 1 to 4 of 4

Thread: Getting Time Differnce

  1. #1
    K.Zig Guest

    Default Getting Time Differnce

    I have two time values: gotstart & gotend<BR>gotstart represents a start time, gotend represents the endtime.<BR>I want an ASP code to find the time difference in minutes and be able to write that value on a page (stuff into a variable) in time format e.g (:45)<BR><BR>In other words if I had gotstart as 10:00 AM and endtime as 10:45 AM, how can I have :45 appear on the page as the time differnce?

  2. #2
    Join Date
    Dec 1969
    Posts
    29

    Default RE: Getting Time Differnce

    &#060;%=DateDiff("s",gotstart,gotend)%&#062; will give you seconds just divide by 60 to get minutes...

  3. #3
    Rajesh Singla Guest

    Default RE: Getting Time Differnce

    this Datediff("n",gotstart,gotend) will gives the time in minutes<BR>and then divide that value with 60. The divide operator ("\") wil give you the time in Hours and "Mod" operator will give you the time in minutes.<BR>

  4. #4
    Join Date
    Dec 1969
    Posts
    181

    Default Thanks for your speedy reply

    Next time, try not answering questions that have been asked a year and a half ago. Don&#039;tcha think they gave up looking here for an answer, hmmmmmm?


Posting Permissions

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