If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Getting date -1 value

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-07-05, 09:28
gomes009 gomes009 is offline
Registered User
 
Join Date: Feb 2004
Posts: 37
Getting date -1 value

I am trying to get the date -1 value in one of the Variable.

TEST_DATE=date '+%Y-%m-%d'

echo "TODAY's DATE " $TEST_DATE

TODAY's DATE 2005-01-07

How can I assign yesterday's date, "2005-01-06" to TEST_DATE variable..

Any help is appreciated..
Reply With Quote
  #2 (permalink)  
Old 01-07-05, 12:39
vgersh99 vgersh99 is offline
Registered User
 
Join Date: Apr 2004
Location: Boston, MA
Posts: 325
Quote:
Originally Posted by gomes009
I am trying to get the date -1 value in one of the Variable.

TEST_DATE=date '+%Y-%m-%d'

echo "TODAY's DATE " $TEST_DATE

TODAY's DATE 2005-01-07

How can I assign yesterday's date, "2005-01-06" to TEST_DATE variable..

Any help is appreciated..
try http://home.comcast.net/~j.p.h/cus-faq.html
Appendix A:
__________________
vlad
+-----------------------+
| #include <disclaimer.h> |
+-----------------------+
Reply With Quote
  #3 (permalink)  
Old 01-08-05, 11:58
gomes009 gomes009 is offline
Registered User
 
Join Date: Feb 2004
Posts: 37
Thanks Vlad,

It helps...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On