Find time difference


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Find time difference
# 8  
Old 06-25-2012
Are the 6Z and 5Z a representation of timezone offsets?
# 9  
Old 06-26-2012
Code:
SunOS EGPRS1 5.10 Generic_137137-09 sun4u sparc SUNW,SPARC-Enterprise

---------- Post updated at 10:43 AM ---------- Previous update was at 10:43 AM ----------

Quote:
Originally Posted by methyl
Are the 6Z and 5Z a representation of timezone offsets?
no it does not , i intend to remove them .

---------- Post updated 06-26-12 at 03:21 AM ---------- Previous update was 06-25-12 at 10:43 AM ----------

Dears,

Any update.

Ill be glad if anyone supported.

Regards,

Last edited by methyl; 06-26-2012 at 06:57 PM.. Reason: code tags
# 10  
Old 06-26-2012
You've been given plenty of resources to try; what have you tried? If you have problems with any of them we can certainly help, or problems with the details of it go ahead and ask, but this FAQ exists for a reason. Questions like yours happen all the time, it's just a matter of chopping up your input in a way to feed it into the scripts already given.

Furthermore, bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.
# 11  
Old 06-26-2012
We've got to post #10 and seen no code from the O/P which might give us a clue what Programming Language or Shell is preferred. There is no point in re-inventing the wheel because the basics of subtracting timestamps are in the FAQ posts.
Now if the O/P tries some code to tackle the whole program and then hits a problem, that is different.

Last edited by methyl; 06-26-2012 at 06:56 PM..
# 12  
Old 06-27-2012
Dears,

Thanks alot for all your comments ,let me clarify some issues.

1-When i first posted my question i posted in shell-programming and scripting, just after i found that it's position in such forum is misleading so i re posted it this forum

2-I am a newbie in this forum and this is the first script i write . so thanks for your patience and cooperation.

3-I am sure that all of your assistance is very valuable ,i do not intend to waste any of your time .

4-I have tried many things and recently read a lot of useful stuff in FAQ .

Here is what ive upto :

a-I succeeded to remove the ".oz" in the last of 2 dates

I found the below script which transfers the YYMMDD to YY month(MM)-DD

Code:
echo "20110614" | nawk 'BEGIN{split("JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC",month," ")}
{printf("%s-%s-%s\n",substr($0,7,2),month[substr($0,5,2)+0],substr($0,1,4))}'

b- sadly its not YYYYMMDDHHMMSS ,even if so i cant get to subtract 2 times.

c- I read something about unix time . if i managed to modify such time into unix time will i be able to find the difference easly ?

Thanks alot for your cooperation in advance.



Moderator's Comments:
Mod Comment Please view this code tag video for how to use code tags when posting code and data.

Last edited by vbe; 06-27-2012 at 11:32 AM.. Reason: code tags
# 13  
Old 06-27-2012
# 14  
Old 06-27-2012
The all three links is how to transfer a 8-digit date to a normal julian date and do arithmatic actions

My request was on a 14-digit date YYYYmmDDHHMMSS time difference.
 
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

awk script to find time difference between HTTP PUT and HTTP DELETE requests in access.log

Hi, I'm trying to write a script to determine the time gap between HTTP PUT and HTTP DELETE requests in the HTTP Servers access log. Normally client will do HTTP PUT to push content e.g. file_1.txt and 21 seconds later it will do HTTP DELETE, but sometimes the time varies causing some issues... (3 Replies)
Discussion started by: Juha
3 Replies

3. 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

4. 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

5. Shell Programming and Scripting

Find time difference between two consecutive lines in same file.

Hello I have a file in following format: IV 08:09:07 NM 08:12:01 IC 08:12:00 MN 08:14:20 NM 08:14:15 I need a script to compare time on each line with previous line and show the inconsecutive line. Ex.: 08:12:00 08:14:15 A better way... (6 Replies)
Discussion started by: vilibit
6 Replies

6. Shell Programming and Scripting

How to calculate time difference between start and end time of a process!

Hello All, I have a problem calculating the time difference between start and end timings...! the timings are given by 24hr format.. Start Date : 08/05/10 12:55 End Date : 08/09/10 06:50 above values are in mm/dd/yy hh:mm format. Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies

7. 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

8. AIX

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 (1 Reply)
Discussion started by: bandlan9
1 Replies

9. 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

10. Shell Programming and Scripting

To find the time difference between two lines of the same log file

Hello Friends, I want to write a script for the following: nlscux62:tibprod> grep "2008 Apr 30 01:" SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2.log | grep -i post | more 2008 Apr 30 01:01:23:928 GMT +2 SAPAdapter.SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2 Info AER3-000095 IDOC... (2 Replies)
Discussion started by: satyakam
2 Replies
Login or Register to Ask a Question