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!

Date Time Milliseconds calulation Issue

Status
Not open for further replies.

VarunSharma

Programmer
Jul 28, 2021
1
IN
Hi,

I have an requirement in program where at start i fetched current time stamp ex. T1 = '2021-28-07-01-12.32.43.123456' and when the program ends in termination para, again fetch the current time stamp ex. T2 = '2021-28-07-01-12.32.43.345678'. My requirement is to calculate the response time which should be Result = T2 - T1 but i need to store the reponse time in milliseconds only in DB2 TIME column.

Issue 1: How can i get the timestamp difference where i can get the milliseconds only.
Issue 2: In case, if some how i can able to get the timestamp difference in milliseonds, then how can i store it in DB2 column. As per my knowledge we have TIME in DB2 which is defined as X(08)?

Any help will be really appreciated!!!

Thanks,
Varun
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top