• I haven't looked at your attached file yet, but unless you're storing the datetime value for when the status was updated in something other than an actual datetime field, down to the second can be the same, but the actual values for datetime fields can store considerably greater accuracy, so perhaps the real issue is that the value supplied to populate the field is only accurate to the second? If that's the case, no amount of querying is going to give you an accurate answer, so you're going to have to either get a more accurate time source to populate that field (e.g. using GETDATE() as part of the INSERT or UPDATE query), or application logic is somehow going to have to know the difference because of other data that might be handy (but probably isn't). Unfortunately, that won't solve the problem until ALL the status records get at least one update of some kind to ensure the datetime value is sufficiently accurate for each item.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)