Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash get todays date formatted

TODAY=$(date +'%Y%m%d')
# looks like: 20221025 / YYYYMMDD

TODAY=$(date +'%Y-%m-%d')
# looks like: 2022-10-25 / YYYY-MM-DD

# For more, google "bash get date format"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #bash #todays #date #formatted
ADD COMMENT
Topic
Name
3+5 =