[root@mengding ~]# date "+%Y-%m-%d"
2019-05-17
[root@mengding ~]# date "+%Y-%m-%d %H:%M:%S"
2019-05-17 04:04:46
[root@mengding ~]# date
Fri May 17 04:10:40 EDT 2019
[root@mengding ~]# date -d yesterday
Thu May 16 04:10:47 EDT 2019
[root@mengding ~]# date -d yesterday "+%Y-%m-%d %H:%M:%S"
2019-05-16 04:10:50