Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
how to calculate days between dates
Name: unixgirl Date: April 3, 2007 at 10:20:24 Pacific OS: Unix AIX CPU/Ram: 512 Product: IBM
Comment:
I have two dates and I'd like to find how many days between these two dates? Ex: 04/03/07 - 03/31/07 should be 4 days! Thanks
Name: wollie Date: April 3, 2007 at 14:06:58 Pacific
Reply:
Hi unixgirl,
presently no other clue than to transform the dates: "daysofmonthspassed" + days (easy as long as in the same year, a bit more tricky to reflect leap years and dates covering different years)
sorry for the bad news
Wollie
0
Response Number 2
Name: nails Date: April 3, 2007 at 14:35:18 Pacific
Reply:
We've discuss unix date arithmetic a lot in this forum. Take a look at:
Name: unixgirl Date: April 4, 2007 at 12:14:34 Pacific
Reply:
Thanks Nails. I've actually took time to browse thru forum and found one of your response to 'uribo' on get_JD() function. I've used it and it worked on my script. Thanks again. UnixGirl
0
Response Number 4
Name: nails Date: April 4, 2007 at 13:25:38 Pacific
Summary: i need help! can someone help me please? i try to calculate date under unix (ksh)... example: todays date: 2003.07.23 date-5 = 2003.07.28 how can i do calculate? i know that it is not possible with th...
Summary: Hi Experts, Using unix-KSH script, we need to calculate the difference between two time intervals. for example; time_a=04:35:54 time_b=00:00:05 (pls. note that this shows only seconds) Now, the...