Quantcast
Channel: Having problem displaying date? - Ask Ubuntu
Browsing all 3 articles
Browse latest View live

Answer by Avinash Raj for Having problem displaying date?

Try also this command on terminal to display date in (year/month/date) format,echo "Current date is:" $(date +'%y/%m/%d')To display time with AM,PM format,echo "Current time is:" $(date +"%r")

View Article



Answer by steeldriver for Having problem displaying date?

You need to substitute the value of the command by putting it in $( ... )echo "Current date is: $(date +%D)"or using backticks (a common older syntax that you will see)echo "Current date is: `date...

View Article

Having problem displaying date?

I want to display following line: Current date is: 2013/12/03 Current time is: 08:50 PMWhat I have done is: echo "Current date is:" date +%D echo "Current time is:" date +%RBut I have not been able to...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images