The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Days difference between two dates Data469 Shell Programming and Scripting 6 03-26-2008 03:32 PM
Find number of days and list out the dates in between Raynon Shell Programming and Scripting 2 02-12-2007 08:52 PM
Calc number of days in a month flounder Shell Programming and Scripting 3 07-20-2006 08:44 AM
Difference between two dates in no of days ??? csaha Shell Programming and Scripting 1 01-13-2006 06:44 AM
days elapsed between 2 dates rkkiran UNIX for Dummies Questions & Answers 1 03-04-2002 12:45 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-15-2007
radheymohan radheymohan is offline
Registered User
  
 

Join Date: Oct 2007
Posts: 1
Number of days between two distinct dates

Hi

I'm looking for a .ksh script/function that will calculate ONLY the number of days between two distinct dates. Further convert the number of days to weeks and display. I need this to be part of another larger script that checks the password expiry on several servers and notifies the administrator about ageing passwords.

Can someone please provide me with a plugin function/script that i could use for this purpose.

fyi, i reviewed the datecalc script but it does not serve my purpose entirely. Much obliged to anyone who can help...

Regards
Radheymohan
  #2 (permalink)  
Old 10-16-2007
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2003
Location: Florida
Posts: 1,861
i suggest you convert both dates to Julian dates (the number of days since January 1, 4713 B.C), subtract larger number from smaller number and divide by 7.

Here is a pointer to an article which may help:

http://www.samag.com/documents/s=937...307b/0307b.htm
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 07:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0