How to chnage format and subtract time and date and get average.?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to chnage format and subtract time and date and get average.?
# 1  
Old 10-23-2015
How to chnage format and subtract time and date and get average.?

Hello All ,

Please support for below request

how to change format and subtract time and date and get average.

xxx 13-OCT-15 11.32.18.241000 AM 13-OCT-15 11.35.49.089080 AM
xxx 13-OCT-15 11.32.24.000000 AM 13-OCT-15 11.45.17.810904 AM
xxx 13-OCT-15 11.32.25.232000 AM 13-OCT-15 11.37.07.204904 AM
xxx 13-OCT-15 11.32.36.537000 AM 13-OCT-15 11.35.04.073646 AMthere can be AM in one column and PM in another.and day can also vary.
Please help
# 2  
Old 10-23-2015
Any attempt from your side?

---------- Post updated at 10:58 ---------- Previous update was at 10:57 ----------

And, I don't have the slightest clue of what you want to achieve.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Date command - subtract from given time

the given time is: 12:13:00 how do i subtract a 10 minutes from any given time? date '12:13:00' '-10 min' also tried this: date +12:13:00 '-10 min' (2 Replies)
Discussion started by: SkySmart
2 Replies

2. Shell Programming and Scripting

Subtract two rows (in Time format)

Hello all, I have written sth like this: #!/bin/bash grep -e XXX -e YYYY myfile.log | grep -v ZZZ | awk '{print $1 " " $2 ";" $3 ";" $9 ";" $11}' > myfile.csv sed -i '1iDate;Time;From;To' myfile.csv => it is clear that it converts log to csv and add a header. Now I want to subtract row... (4 Replies)
Discussion started by: frhling
4 Replies

3. HP-UX

DATE and TIME format help in HP-UX

Hello, I have date format as shown in red color below Fri, Sep 12, 2012 08:38:05 PM Can anyone help me with command to change this format to yyyy-mm-dd and HH:MM:SS Note: Time should be in 24 hours format I really appreciate your help!! Thanks, Elavarasan (4 Replies)
Discussion started by: Elavarasan
4 Replies

4. UNIX for Dummies Questions & Answers

Shell Scripts - shows today’s date and time in a better format than ‘date’ (Uses positional paramete

Hello, I am trying to show today's date and time in a better format than ‘date' (Using positional parameters). I found a command mktime and am wondering if this is the best command to use or will this also show me the time elapse since 1/30/70? Any help would be greatly appreciated, Thanks... (3 Replies)
Discussion started by: citizencro
3 Replies

5. Shell Programming and Scripting

awk & date time format

This gives: grep "qprt -o -dp -N 1 -P" printfile.log.1216 |awk '{print $7, $9}' |grep lpc1z The output like below: lpc1z /cerner/d_prod/print/ccltemp4235396d030a.dat.tmp.1216075330] lpc1z /cerner/d_prod/print/ccltemp4235396d036a.dat.tmp.1216075634] lpc1z... (2 Replies)
Discussion started by: Daniel Gate
2 Replies

6. Shell Programming and Scripting

date and time in mm/dd/yyyy hh:mm format

Frens, I have a logfile which has got manier things in it and somewer in that file i have a date in mm/dd/yyyy hh:mm format.... I just need to get the date and time nothing else.... i have searched in this forum for it but got only date in mm-dd-yyyy format.. but i need to search for... (10 Replies)
Discussion started by: smarty86
10 Replies

7. Shell Programming and Scripting

Date and Time format

I want to append current date and time to a file name like filename_090920091210. If I use filename_`date +%d%m%Y%T`, the ouput is filename_0909200912:10:33. How to format this as filename_090920091210. Please let me know. Thanks in advance. (3 Replies)
Discussion started by: srimenon09
3 Replies

8. Shell Programming and Scripting

Convert Epoch time format to normal date time format in the same file

I have a file named "suspected" with series of line like these : {'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''} {'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Discussion started by: rk4k
3 Replies

9. UNIX for Dummies Questions & Answers

Subtract date & time in diferent rows

Hi Friends :) I have a long file having fields in the form : Field1 yy/mm/dd hh:mm:ss Duration(Sec) line 1) 123123 05/11/30 12:12:56 145 line 2) 145235 05/11/30 12:15:15 30 line 3) 145264 05/11/30 13:14:56 178 . . I want to subtract yy/dd/dd hh:mm:ss in line (2) from yy/mm/dd hh:mm:ss in... (1 Reply)
Discussion started by: vanand420
1 Replies

10. Shell Programming and Scripting

format date/time presentation

1) i am trying to print the timeframe of a log file using the start/end date/time being extracted from the file itself. my problem is how to convert the following numeric date format to the one that i prefer: Start time: 0204161129 End time : 0204171431 into: Start time: Apr 16 2002... (6 Replies)
Discussion started by: apalex
6 Replies
Login or Register to Ask a Question