I have date format in an excel sheet as 07/03/2014 11:21. I need to check this date with current date and need to find whether it is more than 30 days or not.
I know how to current date into days, but someone please help me to change the date in the excel sheet to days, so that i can check with simple expr function.
With GNU date, you can do something like this, in sh or bash:
#!/bin/sh
# Past date in seconds since Epoch
past=$(date +%s --date "12/02/2013 11:21")
# Now in seconds since Epoch
now=$(date +%s)
# Interval in seconds -- 30 days in this case
interval=$((30*86400)) #86400 seconds per day
if [ "$((now-past))" -gt "$interval" ]; then x='more'; else x='less'; fi
printf '%s\n' "Past date is $x than 30 days"
exit 0