Sponsored Content
Full Discussion: date search
Top Forums Shell Programming and Scripting date search Post 302137234 by jaduks on Monday 24th of September 2007 01:49:33 AM
Old 09-24-2007
thirumaran , could you please input some sample ldr.out and dberror.log contents, if possible, that will be helpful.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Search by modification date

Hi I'd like to know if is it possible to find files given a certain modification date (say, 01-05-2006, that's 1st of May 2006) I can calculate the days backward: find / -ctime 23 but I wish to search by exact modification day Thanks (5 Replies)
Discussion started by: slink
5 Replies

2. Shell Programming and Scripting

search by modified date

Hello, How can i search for all the files in a particular directory which are not updated from past 5 days. Thanks, Sateesh (4 Replies)
Discussion started by: kotasateesh
4 Replies

3. UNIX for Dummies Questions & Answers

Search for a file with Current Date

Hi, How can we search for a file with current date(sysdate). Actually i want the file name from a directory which was created today(current date). For example i have a dir /home/arch and i have files with name aglito03axyz.datetimestamp in this directory, but all these files were created... (7 Replies)
Discussion started by: sandeep_1105
7 Replies

4. Shell Programming and Scripting

Search files between a date range

Hi people A newbie here, thrown into the deep end. I want to select the group of files with in a range of dates and perform some operation on it. Are there inbuild date libraries i can use? I did read thru the old posts on this topic. Couldnt get much idea :(, basically want to know how I... (7 Replies)
Discussion started by: zcanji
7 Replies

5. Solaris

search for date of modification

hi member. i want to know all file in the system which the last date of modification = 14-06-2010 for example what can i do (4 Replies)
Discussion started by: xxmasrawy
4 Replies

6. Shell Programming and Scripting

Search for files on a particular date

I have list of files generated on 2 dates which are shown below: -rw-r----- 1 bobby ccsdba 580945 Aug 16 16:13 file 1 -rw-r----- 1 bobby ccsdba 580945 Aug 16 16:16 file 2 -rwxrwxr-x 1 Shaan ccsdba 4422724 Aug 16 16:28 file 3 -rwxrwxr-x 1 bobby ccsdba 794 ... (1 Reply)
Discussion started by: bobby1015
1 Replies

7. Shell Programming and Scripting

How to search for file and display by date

I like "ls -ltr". I would like to search for a file in a large directory recursively and and display all the candidates in reverse order. /usr/bin/find . -name \*.txt This works. How do I display the date and sort the file names by the date in reverse order for the entire directory... (1 Reply)
Discussion started by: siegfried
1 Replies

8. Shell Programming and Scripting

How to search log file from a date

Hi All, I want to grep through all the log files created from 20th August. How do I do that? My script will run everyday. So it will take current date as To_Date. My log file name looks like - applog-2012-08-20-000001....applog-2012-08-20-000002...etc. Thanks in advance. (5 Replies)
Discussion started by: kmajumder
5 Replies

9. Shell Programming and Scripting

How to search file for a date variable?

Hello, I'm trying to write a ksh script which will allow me to to search for yesterday's date within a rtf file. I just need someway to know if the date is in the file, echo results to a text file, and then mail that out. The format of the date is mm/dd/yyyy. I had to make a variable... (2 Replies)
Discussion started by: ronan1219
2 Replies

10. Shell Programming and Scripting

UNIX: Search file between two Date stamps

Hi, I have a requirement to find a file based on date stamp provided by user. In one of the shared location I get data file say “datafile<dataformat>“. And User will provide the date based on which I need to select a file which is 7 days older, if a file not present within 7 days, then I need... (3 Replies)
Discussion started by: santhosh86467
3 Replies
DATETIME.ADD(3) 							 1							   DATETIME.ADD(3)

DateTime::add - Adds an amount of days, months, years, hours, minutes and seconds to a DateTime object

       Object oriented style

SYNOPSIS
public DateTime DateTime::add (DateInterval $interval) DESCRIPTION
Procedural style DateTime date_add (DateTime $object, DateInterval $interval) Adds the specified DateInterval object to the specified DateTime object. PARAMETERS
o $object -Procedural style only: A DateTime object returned by date_create(3). The function modifies this object. o $interval - A DateInterval object RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure. EXAMPLES
Example #1 DateTime.add(3) example Object oriented style <?php $date = new DateTime('2000-01-01'); $date->add(new DateInterval('P10D')); echo $date->format('Y-m-d') . " "; ?> Procedural style <?php $date = date_create('2000-01-01'); date_add($date, date_interval_create_from_date_string('10 days')); echo date_format($date, 'Y-m-d'); ?> The above examples will output: 2000-01-11 Example #2 Further DateTime.add(3) examples <?php $date = new DateTime('2000-01-01'); $date->add(new DateInterval('PT10H30S')); echo $date->format('Y-m-d H:i:s') . " "; $date = new DateTime('2000-01-01'); $date->add(new DateInterval('P7Y5M4DT4H3M2S')); echo $date->format('Y-m-d H:i:s') . " "; ?> The above example will output: 2000-01-01 10:00:30 2007-06-05 04:03:02 Example #3 Beware when adding months <?php $date = new DateTime('2000-12-31'); $interval = new DateInterval('P1M'); $date->add($interval); echo $date->format('Y-m-d') . " "; $date->add($interval); echo $date->format('Y-m-d') . " "; ?> The above example will output: 2001-01-31 2001-03-03 NOTES
DateTime.modify(3) is an alternative when using PHP 5.2. SEE ALSO
DateTime.sub(3), DateTime.diff(3), DateTime.modify(3). PHP Documentation Group DATETIME.ADD(3)
All times are GMT -4. The time now is 04:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy