×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Date Time Milliseconds calulation Issue

Date Time Milliseconds calulation Issue

Date Time Milliseconds calulation Issue

(OP)
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

RE: Date Time Milliseconds calulation Issue

isn't there a typical DB2/SQL solution for?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close