The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
convert date format YYYYMMDD to MM/DD/YYYY nasirgondal Shell Programming and Scripting 7 08-07-2008 06:06 AM
Yesterday in i.e. May 09 and 05/09 format Daniel Gate Shell Programming and Scripting 3 05-20-2008 01:59 PM
get yesterday in yyyymmdd format aaron_fong Shell Programming and Scripting 13 03-14-2008 12:14 PM
How can i get the yesterday's date in YYYYMMDD format prasadsr HP-UX 4 01-19-2007 06:52 AM
Date increment in the format "YYYYMMDD" ganapati Shell Programming and Scripting 4 08-02-2006 08:45 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 11-08-2001
Registered User
 

Join Date: Nov 2001
Location: Hong Kong
Posts: 3
Question get yesterday date in yyyymmdd format

I would like to know how I could get a yesterday date in yyyymmdd e.g. today is 20011109, and I would like to get 20011108. Thank you!
__________________
Thanks for helping hk_newbie!
Forum Sponsor
  #2  
Old 12-07-2001
ghoti's Avatar
Registered User
 

Join Date: Jul 2001
Location: Wales
Posts: 55
Try this link then.... and just rearrange the variables then :-)

Need to go back 1 day using the date command
__________________
regards,

-ghoti
  #3  
Old 12-14-2001
Registered User
 

Join Date: Dec 2001
Location: Iowa
Posts: 2
YESTERDAY=`TZ=aaa24 date +%Y%m%d`

This will give you yesterdays date in the format you are requesting.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0