How to find time difference between 2 timestamps?


 
Thread Tools Search this Thread
Operating Systems AIX How to find time difference between 2 timestamps?
# 1  
Old 11-13-2009
How to find time difference between 2 timestamps?

HI All,

can some one please help me how to fine the difference between two time stamps say

a= Nov 10, 2009 9:21:25 AM
b= Nov 10, 2009 10:21:25 AM

I want to find difference between the a & b

I googled and tried with some options but no luck.

My OS is AIX
# 2  
Old 11-13-2009
Hi,

You will probably find what you're after in the FAQ article on this site:

https://www.unix.com/answers-frequent...rithmetic.html

Have a look and see if you get your answer :-)

HTH
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

In HP-UX how to find the date time difference ?

Hello, In HP-UX how to find the date time difference ? Start time: 28-APR-2019 21:36:01 End time : 29-APR-2019 00:36:04 ---------------------- Difference is ---------------------- Much appreciate any pointer or view on this. ... (3 Replies)
Discussion started by: Siva SQL
3 Replies

2. Shell Programming and Scripting

Find time difference based on logfile

Hi All, Firstly thank you for the forum members I need to find time difference b'w two rows of timestamp using awk/shell. Here is the logfile: cat business_file start:skdjh:22:06:2010:10:30:22 sdfnskjoeirg wregn'wergnoeirnfqoeitgherg end:siifneworigo:22:06:2010:10:45:34... (3 Replies)
Discussion started by: Srinivas Gadi
3 Replies

3. Shell Programming and Scripting

Finding difference in 2 different timestamps

Legends, I have a requirement to run the script exactly after one hour of completion of dependent script. Eg: Script B should run after one hour on the completion of Script A. I got the time stamps using following variables. these scripts runs in autosys > DATE=`date +%H:%M` >... (4 Replies)
Discussion started by: sdosanjh
4 Replies

4. UNIX for Dummies Questions & Answers

Find time difference

I have a file wich contains time formats and i need to get the time difference TIME1 TIME2 =============== =================== 20120624192555.6Z 20120624204006.5Z which means first date 2012/6/24 19:25:55,second date 2012/6/24 20:40:06 so when i get the time... (23 Replies)
Discussion started by: wnaguib
23 Replies

5. Shell Programming and Scripting

How to find time difference?

I have a file wich contains time formats and i need to get the time difference TIME1 TIME2 ================================== 20120624192555.6Z 20120624204006.5Z which means first date 2012/6/24 19:25:55,second date 2012/6/24 20:40:06 so when i get the time... (1 Reply)
Discussion started by: wnaguib
1 Replies

6. Shell Programming and Scripting

Find Time difference in Unix

Hi, START_TIME :- "10-NOV-2009 00:00:04" STOP_TIME :- "10-NOV-2009 00:05:47" Please help to find difference between these two. Searched for the same topic but did not find an answer for the same time format :( Regards, Robin (3 Replies)
Discussion started by: robinbannis
3 Replies

7. Shell Programming and Scripting

Difference between two timestamps Contd..

There was this thread earlier with the same name and the solution provided was excellent. Here is the solution to find diffrenc between two timestamp $ cat timestamp #! /usr/bin/ksh echo enter first time stamp read TIME1 echo enter second time stamp read TIME2 H1=${TIME1%:+()}... (3 Replies)
Discussion started by: Shellslave
3 Replies

8. Shell Programming and Scripting

Help to find the time difference between the lines

Hi guru's, Am new to shell scripting. I am getting the below o/p from the oracle database, when I fire a query. ID JOB_ID ELAPSED_TIME FROM TO ----- ------ ------------------- -------- -------- 62663 11773 01/06/2009 09:49:13 SA CM 62664 11773 ... (4 Replies)
Discussion started by: sathik
4 Replies

9. UNIX for Dummies Questions & Answers

how to find difference of 2 timestamps in secs?

I have a requirement to find the time difference in second between 2 given time stamps. An example scenario is shown below: 30 Oct 11:42:29:992 DEBUG org.apache.commons.digester.Digester - New match='form-validation/global/validator' (IID=, TID=) 30 Oct 11:42:29:993 DEBUG... (0 Replies)
Discussion started by: Alecs
0 Replies

10. Solaris

Difference between two timestamps

I'm writting a script to find the difference between two timestamp. One field i get on delivery time of the file like 07:17 AM and other is my SLA time 06:30 AM I need to find the difference between these two time (time exceeded to meet SLA). Need some suggestions. (8 Replies)
Discussion started by: raman1605
8 Replies
Login or Register to Ask a Question