How to the date of yesterday?

How to the date of yesterday?

Post by Mr Chung Chi Wo » Thu, 28 Sep 1995 04:00:00



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 to the date of yesterday?

Post by Jeff Dicks » Thu, 28 Sep 1995 04:00:00




>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

You should practice what you preach. The 'date' command doesn't have that
provision.

Jeff S.*son


 
 
 

How to the date of yesterday?

Post by Vincent Zoonekyn » Thu, 28 Sep 1995 04:00:00


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

 
 
 

How to the date of yesterday?

Post by Reece Kimball Ha » Sat, 30 Sep 1995 04:00:00



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...

$ (export TZ="JST+29"; date +%d%m%y)

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) |

 
 
 

How to the date of yesterday?

Post by Vincent Zoonekyn » Sun, 01 Oct 1995 04:00:00



Quote:>> man date
>> (GNU date, preferably.)
>> -- Vincent

Jeff> You should practice what you preach. The 'date' command doesn't have that
Jeff> provision.

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?

4. QVWM Run problem

5. How to get the date of yesterday ?

6. Uniplex file format

7. get date of yesterday ?

8. Help with variables in C Shell

9. get the date of yesterday in ksh (AIX)

10. Date Question: Yesterday

11. Date of yesterday...

12. Get day before yesterday's and yesterday's date.

13. Calculating yesterday's date using GNU 'date' (was Re: Require a script)