Sponsored Content
Top Forums UNIX for Beginners Questions & Answers In HP-UX how to find the date time difference ? Post 303035017 by Neo on Saturday 11th of May 2019 04:20:22 AM
Old 05-11-2019
You should convert the formatted dates to a UNIX timestamp, then calculate the difference (or whatever your requirement), and then you can covert back into any date format you desire.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Date and time difference

Hi, I am starting a process at 9 pm today and want to exit the process by 5am, the next day. Every day at 9pm the shell script will be invoked by autosys. But how can i monitor in my script for 5 am and stop the process ? there may be a case where the script can start at 4.59 am and... (4 Replies)
Discussion started by: risshanth
4 Replies

2. Shell Programming and Scripting

About date & time difference

Hello All, I was having a look on threads on the Forum about time calculation but didn't find exactly this issue. For instance, if we have these 2 dates, begin & end : 20100430235830 20100501000200 Is there anyway, awk, ksh, perl to calculate the difference in sec and get for... (6 Replies)
Discussion started by: rany1
6 Replies

3. Shell Programming and Scripting

Date and time difference

Hi, Below is the backup file name (includes date & time) : exp_trx_tables_18_Oct_2010_10_59_00.dmp Extracted date and time from the file name as below using the below "awk"command: date 18-Oct-2010 and time 10:59:00 echo "$fname" | awk -F"_" '{printf "Records will be restored as on... (1 Reply)
Discussion started by: milink
1 Replies

4. Shell Programming and Scripting

Date and time difference

I have start and finish date in the following format - Start Date: 5/21/2010 9:14:00 AM End Date : 5/24/2010 7:23:00 AM I need to get the time difference in the following format :mm or . Any help would be really appreciated. Thank you! (3 Replies)
Discussion started by: randev
3 Replies

5. UNIX for Dummies Questions & Answers

Date and time difference

Hi, I am trying to use the script as under : echo "Please input the string (APC) in the format (APC=x-yyy-z):" read a for i in m1 m2 m4 m5 m6 do cat /m12/$i/12* | grep -B 1 -A 1 inaccessible | gawk '/'$a'/{print $6,$7,$8,x};{x=$3" "$4}' | awk NF > temp cat /m122/$i/12* | grep -B 1 -A 1... (0 Replies)
Discussion started by: vanand420
0 Replies

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

7. Shell Programming and Scripting

Date / Time difference in shell script

================================================================================ Request ID GMDCOM TIME GMDRRS TIME COM-RRS ================================================================================ <36812974> Tue Oct 1 13:32:40 2013 Tue Oct 1 20:36:42 2013... (1 Reply)
Discussion started by: ghosh_tanmoy
1 Replies

8. Shell Programming and Scripting

Date / Time difference in shell script

Request ID GMDCOMTM GMDRRSTIME GMDRESTIME <36812986> : : :I want to display the date -time difference in other fields. Above I have given for only 1 record. I want to calculate for all the records. (GMCOMTM - GMDRRSTM) ,(GMDRRSTM-GMDRESTM) and... (5 Replies)
Discussion started by: ghosh_tanmoy
5 Replies

9. Shell Programming and Scripting

Date time difference in UNIX shell script

There are 2 dates, Tue Oct 1 13:40:19 2013 Sun Sept 30 10:26:23 2013 I have multiple dates like the above one. How do I calculate the date time difference and display in another column in Shell script. Please help. (3 Replies)
Discussion started by: tanmoysays
3 Replies

10. AIX

Time Difference between date and date -u

Hi Everyone, We are having an issue with date and date -u in our AIX Systems. We have checked environment variable TZ and /etc/environment and however, we could not rectify the difference. >date Thu Mar 19 22:31:40 IST 2015 >date -u Thu Mar 19 17:01:44 GMT 2015 Any clue... (5 Replies)
Discussion started by: madhav.kunapa
5 Replies
install::TempContent::Objects::mod_perl-2.0.9::docs::apiUserRContributed Perinstall::TempContent::Objects::mod_perl-2.0.9::docs::api::APR::UUID(3)

NAME
APR::UUID - Perl API for manipulating APR UUIDs Synopsis use APR::UUID (); # get a random UUID and format it as a string my $uuid = APR::UUID->new->format; # $uuid = e.g. 'd48889bb-d11d-b211-8567-ec81968c93c6'; # same as the object returned by APR::UUID->new my $uuid_parsed = APR::UUID->parse($uuid); Description "APR::UUID" is used to get and manipulate random UUIDs. It allows you to "create" random UUIDs, which when "formatted" returns a string like: 'd48889bb-d11d-b211-8567-ec81968c93c6'; which can be parsed back into the "APR::UUID" object with "parse()". API
"APR::UUID" provides the following functions and/or methods: "format" Convert an "APR::UUID object" object into a string presentation: my $uuid_str = $uuid->format; obj: $uuid ( "APR::UUID object" ) ret: $uuid_str returns a string representation of the object (.e.g 'd48889bb-d11d-b211-8567-ec81968c93c6'). since: 2.0.00 "new" Create a "APR::UUID object" using the random engine: my $uuid = APR::UUID->new; class: "APR::UUID" ( "APR::UUID class" ) ret: $uuid ( "APR::UUID object" ) since: 2.0.00 "DESTROY" $uuid->DESTROY; obj: "APR::UUID" ( "APR::UUID object" ) ret: no return value since: 2.0.00 Do not call this method, it's designed to be only called by Perl when the variable goes out of scope. If you call it yourself you will get a segfault when perl will call DESTROY on its own. "parse" Convert a UUID string into an "APR::UUID object" object: $uuid = APR::UUID->parse($uuid_str) arg1: $uuid_str (string) UUID string (.e.g 'd48889bb-d11d-b211-8567-ec81968c93c6') ret: $uuid ( "APR::UUID object" ) The new object. since: 2.0.00 See Also mod_perl 2.0 documentation. Copyright mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. Authors The mod_perl development team and numerous contributors. perl v5.18.2 2015-06-install::TempContent::Objects::mod_perl-2.0.9::docs::api::APR::UUID(3)
All times are GMT -4. The time now is 09:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy