10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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)
Discussion started by: vmachava
2. Shell Programming and Scripting
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
sqlplus $dbuserid/$dbpassword @ $SCRIPT_PATH/business-date.sql >... (3 Replies)
Discussion started by: joyAV
3. Shell Programming and Scripting
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)
Discussion started by: kumarmsk1331
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: intiraju
5. Shell Programming and Scripting
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.
ragha (17 Replies)
Discussion started by: ragha81
6. Shell Programming and Scripting
Can some one guide me how to compare two dates in unix.
Gupta (5 Replies)
Discussion started by: guptan
7. Shell Programming and Scripting
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)?
if ; then
echo "Do something..."
Any ideas or examples?
Thanks. (1 Reply)
Discussion started by: dmilks
is there a c function in linux for comparing dates.
thanx in advance.
svh (2 Replies)
Discussion started by: svh
9. Shell Programming and Scripting
I have two variables both containg dates,
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)
Discussion started by: k_oops9
10. Shell Programming and Scripting
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)
Discussion started by: scmay