You are getting those negative answers because the datediff function
believes that both times are in the same day if no date is supplied.
The number is negative, because the time used as the end time in
DateDiff is earlier than the start time used.
For it to work correctly, the 2 times that you are evaluating would
need to be complete dates like:
[starttime] = 1/13/2004 11:00 PM
[endtime] = 1/14/2004 1:30 AM
If you can, you should have the code that stores the time store it as a
long date instead, by using the Now() function if it is an automatic
entry. If not, then the code should supply the date when the record is
saved. The other alternative is to force some logic at the time you
calculate to handle it after the fact.
also if you add that negative number to 1440 (minutes/day), you get the
correct answer. (1440 + (-1280)) = 160 minutes