- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: date 5 days from now formatted at %Y-%m-%d
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
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
тАО10-08-2003 04:30 AM
тАО10-08-2003 04:30 AM
Can anyone give a hand. I'm trying to get 5 days from now in this format
2003-10-08
i.e. %Y-%m-%d
i've used the commands
date -d "5 days next"
but it returns
Mon Oct 13 01:00:00 UTC 2003
anyone have a quick one liner (preferably without the use of caljd.sh)?
Any answer will be appreciated
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2003 04:48 AM
тАО10-08-2003 04:48 AM
Re: date 5 days from now formatted at %Y-%m-%d
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=230058
Other answers are still welcome though
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2003 04:49 AM
тАО10-08-2003 04:49 AM
Re: date 5 days from now formatted at %Y-%m-%d
date -s '+5 days next'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2003 04:52 AM
тАО10-08-2003 04:52 AM
Re: date 5 days from now formatted at %Y-%m-%d
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2003 05:33 AM
тАО10-08-2003 05:33 AM
Re: date 5 days from now formatted at %Y-%m-%d
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2003 06:33 AM
тАО10-08-2003 06:33 AM
SolutionNot that it was a big deal, I just changed the shell at the top of the script.
I am attaching my version.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2003 11:43 AM
тАО10-08-2003 11:43 AM
Re: date 5 days from now formatted at %Y-%m-%d
date -d "5 days next" +"%Y-%m-%d"
is exactally what you want.
Enjoy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2003 11:07 PM
тАО10-08-2003 11:07 PM
Re: date 5 days from now formatted at %Y-%m-%d
That's perfect. Clay solved it from a different stand point (same result) on the HP forum. but that was much more simple....
my problem when i tried that was I typed:
date -d "5 days next" + "%Y-%m-%d"
instead of
date -d "5 days next" +"%Y-%m-%d"
(I had an extra space after the + sign)
thanks much!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-09-2003 11:19 AM
тАО10-09-2003 11:19 AM
Re: date 5 days from now formatted at %Y-%m-%d
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-09-2003 11:29 PM
тАО10-09-2003 11:29 PM