How to get the previous day's date & time in AIX unix. pliz help ASAP. have tried with " date --date " bt nt working.
The AIX date command does not support GNU extensions. The easiest was of doing what you want is a perl program. Here is a trick I learned from FishMonger: since there are 86,400 seconds in a day, subtract that from the time argument - a function of perl's localtime function: perl -MPOSIX -e 'print strftime("%m-%d-%Y %H:%M:%S",localtime(time-86400*1))'
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |