Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-25-2012
Registered User
 
Join Date: Jun 2012
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
Find time difference

I have a file wich contains time formats and i need to get the time difference

Code:
      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 difference the answer will be 1:14:11

The time above "20120624192555.6Z " is the problem , how to let the unix subtract time or even transfer times to something we can understand.

Ill be glad if anyone can support.

Im new to unix but i think this is not an easy thing

Last edited by vbe; 06-25-2012 at 11:18 AM..
Sponsored Links
    #2  
Old 06-25-2012
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Location: Switzerland - GE
Posts: 4,636
Thanks: 118
Thanked 256 Times in 245 Posts
Did you search the forum?
look here for a start:
http://www.unix.com/tips-tutorials/3...mekeeping.html
Sponsored Links
    #3  
Old 06-25-2012
Registered User
 
Join Date: Jun 2012
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
ya i searched but nothing can solve the problem of the time format ,time difference is seen in the forum but with the time format im requesting its hard

20120624192555.6Z

means

2012/6/24 19:25:55

Thanks
    #4  
Old 06-25-2012
Mead Rotor
 
Join Date: Aug 2005
Location: Saskatchewan
Posts: 16,400
Thanks: 492
Thanked 2,537 Times in 2,420 Posts
What's your system?
Sponsored Links
    #5  
Old 06-25-2012
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Location: Switzerland - GE
Posts: 4,636
Thanks: 118
Thanked 256 Times in 245 Posts
Nothing here?
http://www.unix.com/answers-frequent...rithmetic.html
Sponsored Links
    #6  
Old 06-25-2012
Registered User
 
Join Date: Jun 2012
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
unix,but this is a data in automatic file extraction from a telecom communication platform so i need to make an script to add to be done automatically.
Im sorry if i am not an expert.
Sponsored Links
    #7  
Old 06-25-2012
Mead Rotor
 
Join Date: Aug 2005
Location: Saskatchewan
Posts: 16,400
Thanks: 492
Thanked 2,537 Times in 2,420 Posts
Quote:
Originally Posted by wnaguib View Post
unix
"What is your system?" "UNIX"
"What make and model is your car?" "Blue"

Both very, very vague answers.

If you don't actually know, uname -a
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find time difference? wnaguib Shell Programming and Scripting 1 06-25-2012 10:56 AM
Find Time difference in Unix robinbannis Shell Programming and Scripting 3 11-16-2009 07:31 PM
How to find time difference between 2 timestamps? bandlan9 AIX 1 11-13-2009 07:19 AM
Help to find the time difference between the lines sathik Shell Programming and Scripting 4 09-14-2009 06:35 AM
To find the time difference between two lines of the same log file satyakam Shell Programming and Scripting 2 04-30-2008 10:46 AM



All times are GMT -4. The time now is 03:19 AM.