I need to display date and time in desired format in Unix/ Linux. My desired format is:
dd/mm/yyyy hh:mm:ss:ms in Unix or Linux. I got close using the following command:
echo $(date +%x_%r)
This returns:
08/20/2012_02:26:14 PM
Any suggestions?
Best Answer
if you need to print only two first nums as ms:
to store it in the var: