nitinriaan
New Member
To format the date command’s output, you can use control characters preceded by a + sign. Format controls begin with the % symbol and are substituted by their current values.
Here, the %Y character is replaced with the current year, %m with month, and %d with the day of the month.
You can try these methods too:-
date +”Year: %Y, Month: %m, Day: %d”
date “+DATE: %D%nTIME: %T”
date +”Week number: %V, Year: %y”
Here, the %Y character is replaced with the current year, %m with month, and %d with the day of the month.
You can try these methods too:-
date +”Year: %Y, Month: %m, Day: %d”
date “+DATE: %D%nTIME: %T”
date +”Week number: %V, Year: %y”
Last edited: