It is recommended to use methods of the DateUtils class in order to format dates which are locale aware, i.e. which consider user preferences (e.g. 12h/24h clock time formats). These methods are most appropriate for dates that are displayed to the user.
For fully customized date representations, it is recommended to use the SimpleDateFormat class, as it allows to fully control all date elements.