Sponsored Content
Full Discussion: Two days ahead
Top Forums UNIX for Beginners Questions & Answers Two days ahead Post 303039842 by answer on Wednesday 16th of October 2019 08:44:48 AM
Old 10-16-2019
no in aix:

Code:
aix-tst:/$ DATE=$(date -d "+2 days")
date: Not a recognized flag: d
Usage: date [-u] [+"Field Descriptors"]

 

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Experts Only! Hard Question Ahead!!!!

SunOS5.8 is a radical departure from SunOs4.X in many ways. one of the important differences is the handling of devices. Adding devices under SunOS4.x required a kernel reconfiguration, recompliation and reboot. Under SunOS5.X, this has changed with the ability to add some drivers on the fly.... (1 Reply)
Discussion started by: Foo49272
1 Replies

2. HP-UX

Read-ahead in HP-UX

One cool thing about unix is that it predicts disk blocks that you may need and tries to have them in core before you need them. Over the years, various unix vendors tried various algorithms to improve performance. HP has patented their latest algorithm... Multi-threaded Read Ahead Prediction... (0 Replies)
Discussion started by: Perderabo
0 Replies

3. Shell Programming and Scripting

PERL look ahead and behind ...

I would like to search a router config file for "ip address $ip", once found, I want to grab the line just before that contains "interface $interfacetype" basically saying, 10.3.127.9 is assigned to "Loopback1" given the below as an example. interface Loopback1 ip address 10.3.127.9... (1 Reply)
Discussion started by: popeye
1 Replies

4. AIX

CIO/DIO and JFS2 read ahead

Hi Guys, I wonder if after enabling CIO/DIO at the filesystem level and assuming that CIO/DIO will bypass the JFS2 read ahead available when not using CIO/DIO my questionis what parameters I can play with to tune/improve the CIO in order to obtain similar performance for sequential reads (... (7 Replies)
Discussion started by: hariza
7 Replies

5. UNIX for Dummies Questions & Answers

Selecting line ahead and next using AWK or SED

:confused: Good Day, I have this script that gets the archive names and the time it applies based on the alert log. The application of archives are of daily basis and usually many so having this script helps my job become easier. My problem is that when i get all the time stamps and... (1 Reply)
Discussion started by: ownins
1 Replies

6. Shell Programming and Scripting

trim 0 ahead of a time,pls help~

Hi, I am trying to write a ksh to compare the time in a date date Thu Jul 1 09:01:24 PDT 2010 when I try to get hour date | awk '{print $4}' | cut -f1 -d: 08 how I can trim the 0 ahead of 08 to make it 8? please help~ (7 Replies)
Discussion started by: netbanker
7 Replies

7. Windows & DOS: Issues & Discussions

NFS Share Time an Hour Ahead

Time on unix server shows 8:00a CST Time on Windows 7 Box shows 8:00a CST However when you access an NFS share the time stamp on the files show an hour ahead? Talking about a newly created file shows an hour ahead so at 8:00a the file will show a time stamp of 9:00a CST the problem it... (1 Reply)
Discussion started by: Paul Standley
1 Replies
DATEINTERVAL.FORMAT(3)							 1						    DATEINTERVAL.FORMAT(3)

DateInterval::format - Formats the interval

SYNOPSIS
public string DateInterval::format (string $format) DESCRIPTION
Formats the interval. PARAMETERS
o $format - The following characters are recognized in the $format parameter string. Each format character must be prefixed by a percent sign ( %). +------------------+--------------------------------------+---+ |$format character | | | | | | | | | Description | | | | | | | | Example values | | | | | | +------------------+--------------------------------------+---+ | | | | | % | | | | | | | | | Literal % | | | | | | | | | | | | % | | | | | | | | | | | Y | | | | | | | | | Years, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03 | | | | | | | | | | | y | | | | | | | | | Years, numeric | | | | | | | | | | | | 1, 3 | | | | | | | | | | | M | | | | | | | | | Months, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03, 12 | | | | | | | | | | | m | | | | | | | | | Months, numeric | | | | | | | | | | | | 1, 3, 12 | | | | | | | | | | | D | | | | | | | | | Days, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03, 31 | | | | | | | | | | | d | | | | | | | | | Days, numeric | | | | | | | | | | | | 1, 3, 31 | | | | | | | | | | | a | | | | | | | | | Total number of days as a result of | | | | a DateTime::diff or (unknown) other- | | | | wise | | | | | | | | | | | | 4, 18, 8123 | | | | | | | | | | | H | | | | | | | | | Hours, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03, 23 | | | | | | | | | | | h | | | | | | | | | Hours, numeric | | | | | | | | | | | | 1, 3, 23 | | | | | | | | | | | I | | | | | | | | | Minutes, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03, 59 | | | | | | | | | | | i | | | | | | | | | Minutes, numeric | | | | | | | | | | | | 1, 3, 59 | | | | | | | | | | | S | | | | | | | | | Seconds, numeric, at least 2 digits | | | | with leading 0 | | | | | | | | | | | | 01, 03, 57 | | | | | | | | | | | s | | | | | | | | | Seconds, numeric | | | | | | | | | | | | 1, 3, 57 | | | | | | | | | | | R | | | | | | | | | Sign " -" when negative, " +" when | | | | positive | | | | | | | | | | | | -, + | | | | | | | | | | | r | | | | | | | | | Sign " -" when negative, empty when | | | | positive | | | | | | | | | | | | -, | | | | | | +------------------+--------------------------------------+---+ RETURN VALUES
Returns the formatted interval. NOTES
Note The DateInterval::format method does not recalculate carry over points in time strings nor in date segments. This is expected because it is not possible to overflow values like "32 days" which could be interpreted as anything from "1 month and 4 days" to "1 month and 1 day". EXAMPLES
Example #1 DateInterval example <?php $interval = new DateInterval('P2Y4DT6H8M'); echo $interval->format('%d days'); ?> The above example will output: 4 days Example #2 DateInterval and carry over points <?php $interval = new DateInterval('P32D'); echo $interval->format('%d days'); ?> The above example will output: 32 days Example #3 DateInterval and DateTime::diff with the %a and %d modifiers <?php $january = new DateTime('2010-01-01'); $february = new DateTime('2010-02-01'); $interval = $february->diff($january); // %a will output the total number of days. echo $interval->format('%a total days')." "; // While %d will only output the number of days not already covered by the // month. echo $interval->format('%m month, %d days'); ?> The above example will output: 31 total days 1 month, 0 days SEE ALSO
DateTime::diff. PHP Documentation Group DATEINTERVAL.FORMAT(3)
All times are GMT -4. The time now is 12:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy