Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

date in - format linux

# put current date as yyyy-mm-dd in $date
date=$(date '+%Y-%m-%d')

# put current date as yyyy-mm-dd HH:MM:SS in $date
date=$(date '+%Y-%m-%d %H:%M:%S')

# print current date directly
echo $(date '+%Y-%m-%d')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #date #format #linux
ADD COMMENT
Topic
Name
6+9 =