single digit for day and month on date

hi all,
how do i format the date command so it displays day and month in single digits i.e 8 instead of 08 ??

am using the command (in a ksh) : date +%D
output i get is 10/08/08

thanks in advance.

date +"%Oe"
this will display date in single digit.. you wnat month too in single digit??

oh yes please :slight_smile:

date +"%Oe" output has a space in it e.g " 8" is there a way to get rid of that space ??

as alreay mention by above user u can use for get rid of space
date +"%Oe"| sed 's/ //'

Then why don't you simply change any occurrence of /0 to just /

date +%D | sed 's%/0%/%g'

However, the manual page indicates that you can disable padding by putting a hyphen before the format code.

date +%Y/%-m/%d