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)
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)
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)
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)
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)
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)
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)
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 REDHAT
datetime
datetime(3) Library Functions Manual datetime(3)NAME
datetime - convert between TAI labels and seconds
SYNTAX
#include <datetime.h>
void datetime_tai(&dt,t);
datetime_sec datetime_untai(&dt);
struct datetime dt;
datetime_sec t;
DESCRIPTION
International Atomic Time, TAI, is the fundamental unit for time measurements. TAI has one label for every second of real time, without
complications such as leap seconds.
A struct datetime variable, such as dt, stores a TAI label. dt.year is the year number minus 1900; dt.mon is the month number, from 0
(January) through 11 (December); dt.mday is the day of the month, from 1 through 31; dt.hour is the hour, from 0 through 23; dt.min is the
minute, from 0 through 59; dt.sec is the second, from 0 through 59; dt.wday is the day of the week, from 0 (Sunday) through 6 (Saturday);
dt.yday is the day of the year, from 0 through 365.
The datetime library supports more convenient TAI manipulation with the datetime_sec type. A datetime_sec value, such as t, is an integer
referring to the tth second after the beginning of 1970 TAI. The first second of 1970 TAI was 0; the next second was 1; the last second of
1969 TAI was -1. The difference between two datetime_sec values is a number of real-time seconds.
datetime_tai converts a datetime_sec to a TAI label.
datetime_untai reads a TAI label (specifically dt.year, dt.mon, dt.mday, dt.hour, dt.min, and dt.sec) and returns a datetime_sec.
SEE ALSO now(3)datetime(3)