Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash date yesterday format

#You can get the yesterday date by this:
date -d "yesterday 13:00 " '+%Y-%m-%d'

#and day before yesterday by this:-
date -d "yesterday-1 13:00 " '+%Y-%m-%d'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bash #date #yesterday #format
ADD COMMENT
Topic
Name
5+3 =