You cannot do this using String.format(...) . See the documentation, there is no such converter as a month without leading zeros. You can either use DateFormat , or do it somehow manually (separate the leading zero from the month, if any).
source share