10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am using the below code to get the days difference between 2 dates
ddate="05/31/2018"
bdate="06/10/2018"
diff=$(perl -e 'use Time::Local;
my ($month1,$day1,$year1)=split /\W+/, $ENV{'ddate'};
my ($month2,$day2,$year2)=split /\W+/, $ENV{'bdate'};
my $time1 =... (5 Replies)
Discussion started by: jayadanabalan
5 Replies
2. Shell Programming and Scripting
Hi,
I am not comfortable with dates and I fail to crack this.
I have two strings
Date1="Apr 22 23:59:59 2016 GMT"
Date2="Dec 1 15:08:40 UTC 2015"
I need to find the difference in days between the two dates which in this example is approx 140 days.
Is there an easy way to get the... (3 Replies)
Discussion started by: mohtashims
3 Replies
3. Shell Programming and Scripting
Hi all,
I have a requirement to calculate the difference of number of days of time stamp of a file and system date and if the difference is greater than 15 days it should prompt as previous month file otherwise current month file.
Below is the code i used and it is working fine till now. (You... (2 Replies)
Discussion started by: Ravindra Swan
2 Replies
4. Shell Programming and Scripting
Hi Guys,
Need a small help, how do i get the difference between two dates (in days) in KSH shell
My date is in mm/dd/YYYY format,
Is there a function to get time stamp from the respective date and time ( mm/dd/yyyy HH:MM:SS) (1 Reply)
Discussion started by: selvankj
1 Replies
5. Shell Programming and Scripting
Please help me n days to a date string in PERL. Date is of the format YYYYMMDD
---------- Post updated at 08:56 AM ---------- Previous update was at 08:54 AM ----------
Add n days (2 Replies)
Discussion started by: yahoo
2 Replies
6. Shell Programming and Scripting
I have 3 variables , $file =abc_2011_11_01.txt (current day file), $back = Yes and $forward = No
I need to search for 3 days back files / 3 days forward files if my current file is not present
logic is,
I need to download the current day file.
If it is missing, i need to look out for currentday... (4 Replies)
Discussion started by: irudayaraj
4 Replies
7. Shell Programming and Scripting
I having probelm in time difference output using Delta_YMDHMS, using below start date and enddate I get -30days. Any idea how to fix this issue.
output : 0,1,-30, 0,0,0
Thanks,
Bataf
use POSIX qw/strftime/;
use Date::Calc qw(Delta_YMDHMS);
use Time::Local;
$start_date =... (1 Reply)
Discussion started by: bataf
1 Replies
8. Shell Programming and Scripting
Hi
I have a file which has start time as my first line and End time in last line
start time: 23 May 2008 03:30:33
End time : 23 May 2008 04:30:00
I have to extract these two lines and find the time of execution for the script in PERl.
Any help appreciated
Thanks (1 Reply)
Discussion started by: usshell
1 Replies
9. Shell Programming and Scripting
Hello,
I would like to find out the number of days between two dates of the format yyyy-mm-dd.
Any help on this is highly appreciated.
Thanks. (6 Replies)
Discussion started by: Data469
6 Replies
10. Shell Programming and Scripting
Hi All
How to get the difference between two dates in no of days ??? My date format is like this YYYY/MM/DD. I have to get the no of days between two dates in the given format.
I tried to search the forum but nothing came up similar to my requitement. Your help will be appreciated.
... (1 Reply)
Discussion started by: csaha
1 Replies