- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Calculating date 45 days from now.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2001 07:26 AM
тАО01-11-2001 07:26 AM
Calculating date 45 days from now.
I need a create a script to calculate the date 45 days from now. Can anyone point me in the right direction. Is there a function to do this?
Any help greatly appreciated.
Thanking you.
Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2001 07:33 AM
тАО01-11-2001 07:33 AM
Re: Calculating date 45 days from now.
Here is the link to the package:
http://hpux.connect.org.uk/hppd/hpux/Gnu/sh_utils-2.0/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2001 08:44 AM
тАО01-11-2001 08:44 AM
Re: Calculating date 45 days from now.
This came up yesterday. The solution is in this thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x2fc2854994d9d4118fef0090279cd0f9,00.html
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2001 08:55 AM
тАО01-11-2001 08:55 AM
Re: Calculating date 45 days from now.
Step1. Get the number or seconds from epoch. Date and other functions (what language are you using?) then add 3888000 to that, and convert back into 'human' form.
The number 3888000 is the number of seconds in a day (86400) times the number of days (45). No screwing around with calendars or anything like that. Works every time.
Party on, Garth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2001 11:40 AM
тАО01-11-2001 11:40 AM
Re: Calculating date 45 days from now.
I have an awk script I created just for this purpose, attached. The way I use it in a script is as follows:
echo 'mm/dd/yy/nn' | awk -f date_conv.awk
where nn is number of days to add (or -nn, subtract).
The output comes back as mm/dd/y.
Hope this helps,
Mo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-11-2001 11:40 AM
тАО01-11-2001 11:40 AM
Re: Calculating date 45 days from now.
I have an awk script I created just for this purpose, attached. The way I use it in a script is as follows:
echo 'mm/dd/yy/nn' | awk -f date_conv.awk
where nn is number of days to add (or -nn, subtract).
The output comes back as mm/dd/y.
Hope this helps,
Mo