Hi, Everybody,
How can I get the date of yesterday and return in format
"ddmmyy"? It is easy to get the date of today(`date`), but how about
yesterday...
Thanks
Chi-Chung
How can I get the date of yesterday and return in format
"ddmmyy"? It is easy to get the date of today(`date`), but how about
yesterday...
Thanks
Chi-Chung
Jeff S.*son
Chung> How can I get the date of yesterday and return in format
Chung> "ddmmyy"? It is easy to get the date of today(`date`), but how about
Chung> yesterday...
man date
(GNU date, preferably.)
-- Vincent
$ (export TZ="JST+29"; date +%d%m%y)Quote:>Hi, Everybody,
> How can I get the date of yesterday and return in format
>"ddmmyy"? It is easy to get the date of today(`date`), but how about
>yesterday...
29=24 + hours behind GMT (5 in my case)
varies for cst/cdt
this purportedly works on IRIX, OSF, Solaris, but not HP.
--
Biophysics & Biochemistry, Box 8231 | WWW: http://dasher.wustl.edu/~reece/
Washington Univ. School of Medicine | Phone: (314) 362-4198 (lab) -7183 (fax)
660 South Euclid | PGP public key available by finger & WWW
St. Louis, Missouri 63110 (USA) |
Jeff> You should practice what you preach. The 'date' command doesn't have thatQuote:>> man date
>> (GNU date, preferably.)
>> -- Vincent
Quoted from the GNU date manpage:
EXAMPLES
To print the date of the day before yesterday
date --date 2 days ago
To print the date of the day three months and one day
hence
date --date 3 months 1 day
-- Vincent
1. How can I store in a shell variable the date from yesterday ?
Hi all,
I need to store the date from yesterday in a unix shell variable.
In other systems (programming languages etc.) this can be done with a
function similar to SYSDATE()-1
How can this be realized in a UNIX shell script ????
Many thanks....
Kenny
2. XGA support?
3. How to get the date of yesterday?
5. How to get the date of yesterday ?
8. Help with variables in C Shell
9. get the date of yesterday in ksh (AIX)
12. Get day before yesterday's and yesterday's date.
13. Calculating yesterday's date using GNU 'date' (was Re: Require a script)