01-06-2010
You can check the date/timestamp on the file and then just increment the date/day by 1.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to increment date, using Shell Script, a loop to add one day after 24hrs. :confused:
Cheers
Kunal (1 Reply)
Discussion started by: niceboykunal123
1 Replies
2. Shell Programming and Scripting
I need to increment a date value through shell script.
Input value consist of start date and end date in DATE format of unix.
For eg.
I need increment a date value of 1/1/09 to 31/12/09 i.e for a whole yr.
The output must look like
1/1/09
2/2/09
.
.
.
31/1/09
.
.
1/2/09
.
28/2/09... (1 Reply)
Discussion started by: sunil087
1 Replies
3. Shell Programming and Scripting
Hi,
Iam new to scripting language.:o
can someone help me out solving this thread?hopingly ya....:)
I want to write a script which connects to db and searches the count in a table which has date column and id column.
If the count is not equal to 0 then it should increment the date with the one... (4 Replies)
Discussion started by: jyothi_wipro
4 Replies
4. Shell Programming and Scripting
Hi,
I have a variable lets say DATA_DATE.
I have to pass some value to this variable in YYYYMMDD format.
lets say today I have passed this variable as :
DATA_DATE=20100107
Then pls help me how to calculate another variable DATA_DATE1 (which is DATA_DATE+1).
The code should work... (3 Replies)
Discussion started by: 46019
3 Replies
5. Shell Programming and Scripting
hi Friends,
Today_Dt=`date "+%Y-%m-%d"`
So the Today date is 2010-05-03
I have a file which has date values as below
2010-04-27
2010-04-02
2010-04-18
2010-04-28
2010-04-29
.. (1 Reply)
Discussion started by: Gopal_Engg
1 Replies
6. Shell Programming and Scripting
hi experts,
my requirement is like this i need to develop a shell script to update date part with new incremental date time in file some 'X' which is kept at some server location incrementing every two hours.as i am new to this scripting i need support from u people,thanx in advance (1 Reply)
Discussion started by: amanmro
1 Replies
7. Shell Programming and Scripting
Need to increment the date from "currentdate + 90days" inside the for loop (i=1 to i=50) (5 Replies)
Discussion started by: aroragaurav.84
5 Replies
8. Shell Programming and Scripting
Hi All,
I have a file which has hundred of records with fixed number of fields. In each record there is set of 8 characters which represent the duration of that activity. I want to sum up the duration present in all the records for a report. The problem is the duration changes per record so I... (5 Replies)
Discussion started by: danish0909
5 Replies
9. Shell Programming and Scripting
hey guys,
I need to incerement the date variable for instance
echo `date '+%F %H:%M:00'`
this produces
2014-08-02 20:05:00
-I will grant this to : $Datehour and need to assign 1 hr from now to $Datelasthour
-the script time will be used to talk to DB system information.
however... (4 Replies)
Discussion started by: mo_VERTICASQL
4 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I have parameter file wo_location.prm which has a date variable $last_upd_date= 02032016.
I need to write a unix shell script to find that variable and increment it by 1 day.
The path to the file is root/dir_lc/shared/param/wo_location.prm and the variable is $last_upd_date.
Any... (2 Replies)
Discussion started by: isenhiem
2 Replies
LEARN ABOUT PHP
date_sunrise
DATE_SUNRISE(3) 1 DATE_SUNRISE(3)
date_sunrise - Returns time of sunrise for a given day and location
SYNOPSIS
mixed date_sunrise (int $timestamp, [int $format = SUNFUNCS_RET_STRING], [float $latitude = ini_get("date.default_latitude")], [float
$longitude = ini_get("date.default_longitude")], [float $zenith = ini_get("date.sunrise_zenith")], [float $gmt_offset])
DESCRIPTION
date_sunrise(3) returns the sunrise time for a given day (specified as a $timestamp) and location.
PARAMETERS
o $timestamp
- The $timestamp of the day from which the sunrise time is taken.
o $format
-
$format constants
+-----------------------+-------------------------------------------+
| constant | |
| | |
| | description |
| | |
| | example |
| | |
+-----------------------+-------------------------------------------+
| SUNFUNCS_RET_STRING | |
| | |
| | returns the result as string |
| | |
| | 16:46 |
| | |
| SUNFUNCS_RET_DOUBLE | |
| | |
| | returns the result as float |
| | |
| | 16.78243132 |
| | |
|SUNFUNCS_RET_TIMESTAMP | |
| | |
| | returns the result as integer (timestamp) |
| | |
| | 1095034606 |
| | |
+-----------------------+-------------------------------------------+
o $latitude
- Defaults to North, pass in a negative value for South. See also: date.default_latitude
o $longitude
- Defaults to East, pass in a negative value for West. See also: date.default_longitude
o $zenith
- Default: date.sunrise_zenith
o $gmtoffset
- Specified in hours.
RETURN VALUES
Returns the sunrise time in a specified $format on success or FALSE on failure.
ERRORS
/EXCEPTIONS
Every call to a date/time function will generate a E_NOTICE if the time zone is not valid, and/or a E_STRICT or E_WARNING message if using
the system settings or the $TZ environment variable. See also date_default_timezone_set(3)
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.1.0 | |
| | |
| | Now issues the E_STRICT and E_NOTICE time zone |
| | errors. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
date_sunrise(3) example
<?php
/* calculate the sunrise time for Lisbon, Portugal
Latitude: 38.4 North
Longitude: 9 West
Zenith ~= 90
offset: +1 GMT
*/
echo date("D M d Y"). ', sunrise time : ' .date_sunrise(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1);
?>
The above example will output something similar to:
Mon Dec 20 2004, sunrise time : 08:54
SEE ALSO
date_sunset(3).
PHP Documentation Group DATE_SUNRISE(3)