I'm trying to compare the current date (dd-Mmm-yyyy) against a variable that is an extracted date from an sql script. Below is the code:
#datenow is the current date in the format dd-Mmm-yyyy
But, I'm getting the error bad number
Could you please advise me the correct syntax?
Last edited by Franklin52; 12-03-2011 at 11:40 AM..
Reason: Please use code tags for data and code samples, thank you
HI,
I am able to find days difference using FIND command. However it is comparing between today and the last time it was modified.
I now need to find the difference between a date specified by myself and the last time the file was modified. Is there a command which I can use or I have to... (1 Reply)
hi ,
I have two variables both containg dates,
x= `date`
and
y= `date'
their format being -> Fri Nov 12 22:59:50 MST 2004
how do I compare which one is greater.
->Can dates be converted into integer and then compared?
( one lengthy way would be to compare the words one by... (7 Replies)
Hi All.
Can someone please give me an example of how I'd do a comparison to find out if the last modified date of a file is newer than yesterday (i.e. today - 1 day)?
Example:
if ; then
echo "Do something..."
fi
Any ideas or examples?
Thanks. (1 Reply)
Hi guys
I have a a variable called check_ts which holds a date value. this date value keeps refreshing every 15 minutes.
I am going to start a cron job 5 minutes after the refresh. I have to check if the current date > 20 min of check_ts. how do i do that.
thanks
ragha (17 Replies)
Hi I have yesterday date and todays date stored in two variables.
Today date is stored in variable -- testdate=`date +%m/%d/%Y`
I found the yesterday date and stored in variable -- ydate=$month'/'$day1'/'$year
Now i am trying to find out whether $testdate is less that $ydate.
I am... (6 Replies)
Hi,
I want to compare today's date(DDMMYYYY) with yesterday(DDMMYYYY) from system date,if (today month = yesterday month) then execute alter query else do nothing.One more condition is change of year also i.e today is Jan1 2012 and yesterday is Dec 31 2011.
The above rek i want in Shell... (4 Replies)
Hi,
can we do date comparisons in unix? like if i give the two dates find which date is old one and which is new one and difference between the two dates in terms of hours,minutes,days and months. (1 Reply)
Hi
I am failing to write a script which compares a list of dates in a file with today's date.
OS: Solaris 10
I have a file which has server names & dates, i need to compare the date in this file with today's date, if it is less than today it should print the server name.
code i tried is ... (3 Replies)
Discussion started by: nanz143
3 Replies
LEARN ABOUT CENTOS
hpisettime
hpisettime(1) OpenHPI hpisettime(1)NAME
hpisettime - This sample openhpi application excercises Event Log clock APIs.
SYNOPSIS
hpisettime [-D nn] [-N host[:port]] [-C <cfgfile>] -d mm/dd/yyyy -t HH:MM:SS [-X] [-h]
hpisettime [--domain=nn] [--host=host[:port]] [--cfgfile=file] --date=mm/dd/yyyy --time=HH:MM:SS [--debug] [--help]
DESCRIPTION
hpisettime sets new date and time for the Event Log clock.
If no domain is selected, hpisettime uses a session with the default domain. The selected domain id must be configured via the
openhpidclient.conf file specified in the environment.
OPTIONS
Help Options:
-h, --help
Show help options
Application Options:
-d mm/dd/yyyy, --date=mm/dd/yyyy
New date
-t 24:12:60, --time=24:12:60
New time of day in 24-hr format
-D nn, --domain=nn
Select domain id nn
-X, --debug
Display debug messages
-N "host[:port]", --host="host[:port]"
Open session to the domain served by the daemon at the specified URL (host:port). This option overrides the OPENHPI_DAEMON_HOST and
OPENHPI_DAEMON_PORT environment variables. If host contains ':' (for example IPv6 address) then enclose it in square brackets. For
example: "[::1]" or "[::1]:4743".
-C "file", --cfgfile="file"
Use passed file as client configuration file. This option overrides the OPENHPICLIENT_CONf environment variable.
SEE ALSO
hpi_shell
hpialarms hpifan hpipower hpitop
hpidomain hpigensimdata hpireset hpitree
hpiel hpiiinv hpisensor hpiwdt
hpievents hpionIBMblade hpithres hpixml
ohdomainlist ohhandler ohparam
AUTHORS
Authors of this man page:
Peter D Phan (pdphan@users.sourceforge.net)
Ulrich Kleber (ulikleber@users.sourceforge.net)
Anton Pak (avpak@users.sourceforge.net)
3.2.1 2011-09-20 hpisettime(1)