07-09-2009
Hi Thanks for your reply. now i am able to compare the dates.
But now i am trying to find the date less than one date. how to achive that.
Thanks in advance
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
I face the problem the if else statement dint return correct result for me
my script as below:
#!/bin/ksh
sqlplus -s /nolog <<EOF
connect databaseuser/password
column num new_value num format 9999
set head off
select count(*) num from table1;
exit num
EOF
if ; then
echo "$?"... (6 Replies)
Discussion started by: jaseloh
6 Replies
2. Shell Programming and Scripting
Hi
How to compare created or modified date of two files
help needed
thanks
Vajiramani :) (9 Replies)
Discussion started by: vaji
9 Replies
3. Shell Programming and Scripting
Hi,
I want to compare two tables fieldwise using shell script. Can anyone help me regarding the same.
The approach which i tried is to first move the two tables in simple txt file where each field is now seperated by space. But i can't retrive each field with "space" as a seperator b'coz there... (1 Reply)
Discussion started by: dtidke
1 Replies
4. UNIX and Linux Applications
hi experts
please help me to compare two files which are in different directory
file1<file will be master file>
(/home/rev/mas.txt}
ex x1
x2
file2 <will be in different folder>
(/home/rev/per/.....)
ex x3
x4
the filesinside per folder i need to compare with master file... (1 Reply)
Discussion started by: revenna
1 Replies
5. Shell Programming and Scripting
Iam trying to compare the string in if else... but some how its not working
following is the code
On executing the above one its giving a error message ': bad number'
in the above parameter l & k are numbers and dbfiles and patchefiles are array
If i do echo ift working fine
... (2 Replies)
Discussion started by: kiranlalka
2 Replies
6. Shell Programming and Scripting
how to compare two lines using shell script? (1 Reply)
Discussion started by: suman_dba1
1 Replies
7. Shell Programming and Scripting
I have a directory with about 6 files that we receive regularly. these 6 files contain information for 3 different units, 2 for each unit. files related to a specific unit are named similarly with a change in number at the end of the file. the numbers should be sequential. for each grouping of... (3 Replies)
Discussion started by: scriptman237
3 Replies
8. Shell Programming and Scripting
I have two files; file A and file B. I need all the entries of file A to be compared with file B line by line. If the entry exists on file B, then save those on file C; if no then save it on file D
Note :- all the columns of the lines of file A need to be compared, except the last two columns... (8 Replies)
Discussion started by: ajiwww
8 Replies
9. Shell Programming and Scripting
Hi
i want to compare two files and i need the o/p of only difference
here the files
file1
achilles
aedxbepo
aedxbwdm01
aedxbwdm02
albedo
amarice
ambrister
anakin
anton
argon
artephius
asgard
avatar
aymara (10 Replies)
Discussion started by: venikathir
10 Replies
10. Shell Programming and Scripting
Hi
I am a beginner in UNIX and shell scripting and i have a requirement as stated below,
requirement
Login to a unix server 1
1. connect to a database mysql -uUsername -pPassword
2. Select a Schema : "Use Schemaname1"
3. query for a particular record
... (2 Replies)
Discussion started by: Hamdul
2 Replies
LEARN ABOUT PHP
datetime.setisodate
DATETIME.SETISODATE(3) 1 DATETIME.SETISODATE(3)
DateTime::setISODate - Sets the ISO date
Object oriented style
SYNOPSIS
public DateTime DateTime::setISODate (int $year, int $week, [int $day = 1])
DESCRIPTION
Procedural style
DateTime date_isodate_set (DateTime $object, int $year, int $week, [int $day = 1])
Set a date according to the ISO 8601 standard - using weeks and day offsets rather than specific dates.
PARAMETERS
o $object
-Procedural style only: A DateTime object returned by date_create(3). The function modifies this object.
o $year
- Year of the date.
o $week
- Week of the date.
o $day
- Offset from the first day of the week.
RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | Changed the return value on success from NULL to |
| | DateTime. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
DateTime.setISODate(3) example
Object oriented style
<?php
$date = new DateTime();
$date->setISODate(2008, 2);
echo $date->format('Y-m-d') . "
";
$date->setISODate(2008, 2, 7);
echo $date->format('Y-m-d') . "
";
?>
Procedural style
<?php
$date = date_create();
date_isodate_set($date, 2008, 2);
echo date_format($date, 'Y-m-d') . "
";
date_isodate_set($date, 2008, 2, 7);
echo date_format($date, 'Y-m-d') . "
";
?>
The above examples will output:
2008-01-07
2008-01-13
Example #2
Values exceeding ranges are added to their parent values
<?php
$date = new DateTime();
$date->setISODate(2008, 2, 7);
echo $date->format('Y-m-d') . "
";
$date->setISODate(2008, 2, 8);
echo $date->format('Y-m-d') . "
";
$date->setISODate(2008, 53, 7);
echo $date->format('Y-m-d') . "
";
?>
The above example will output:
2008-01-13
2008-01-14
2009-01-04
Example #3
Finding the month a week is in
<?php
$date = new DateTime();
$date->setISODate(2008, 14);
echo $date->format('n');
?>
The above examples will output:
3
SEE ALSO
DateTime.setDate(3), DateTime.setTime(3).
PHP Documentation Group DATETIME.SETISODATE(3)