Datediff ?

Results 1 to 2 of 2

Thread: Datediff ?

  1. #1
    Join Date
    Dec 1969

    Default Datediff ?

    I am using the datediff function in an sql statement to calculate the minutes between the start and stop times of a machine center. I am having a problem when for example you start the machine center at 10:00pm and you finish at 1:00am instead of 180 minutes it give a negative number. Is there a way to tell the difference between the days so that it will give me 180 instead of the negative number. This is what the statement in the sql statement looks like "datediff(minute,start,stop). Thanks for all any help.

  2. #2
    Join Date
    Dec 1969

    Default RE: Datediff ?

    try ABS(datediff(minute,start,stop))

Posting Permissions

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