Reported By: Tim Young Reported On: 2/27/2007 For: Version 1.00 Build 1
# 2243Subtracting Two Timestamps Results in a Generic Day-Time Interval Subtracting two timestamps results in a generic day-time interval value, when the result should be specifically a day-msecond interval value.
SELECT Timestamp2-Timestamp1 AS Duration
FROM MyTable
Comments and WorkaroundsThe workaround is to simply cast the result as a specific day-time interval like this:
CAST(Timestamp2-Timestamp1 AS INTERVAL DAY TO MSECOND)
ResolutionFixed Problem on 2/28/2007 in version 1.01 build 1
Products AffectedElevateDB Additional Software and Utilities ElevateDB VCL Client-Server ElevateDB VCL Client-Server with Source ElevateDB VCL Standard ElevateDB VCL Standard with Source ElevateDB VCL Trial