Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference between two times WITH MILLISECONDS

Status
Not open for further replies.

cswords

Programmer
Mar 9, 2005
8
US
I have an Oracle database which contains a start time and end time (oracle datatype TIMESTAMP). These times contain milliseconds (i.e. HH:MI:SS.SS).

How do I calculate the difference between these two times INCLUDING MILLISECONDS?

I know that DateDiff ("S", startTime, endTime) will return the difference, but it only goes to seconds and I need MILLISECONDS.

Thanks!
 
I think you'll need to treat the date-time as a string, extract the milliseconds and then make a separate calculation. Find the difference to the nearest second, then adjust manually based on the milliseconds.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top