How Do I Change the Date Format in Unix Shell Script?
Contents to Format Date in Yyyy-Mm-Dd Format, Use the Command Date +%F or Printf “%(%F)Tn” $Epochseconds. the %F Option Is an Alias for %Y-%M-%D. This Format...
Contents
To format date in YYYY-MM-DD format, use the command date +%F or printf “%(%F)Tn” $EPOCHSECONDS . The %F option is an alias for %Y-%m-%d . This format is the ISO 8601 format.
How do I change the date format in bash?
Bash Date Format MM-YYYY
To format date in MM-YYYY format, use the command date +%m-%Y .
Must Read
What is Unix date format?
Unix time is a date-time format used to express the number of milliseconds that have elapsed since January 1, 1970 00:00:00 (UTC). Unix time does not handle the extra seconds that occur on the extra day of leap years.