How to format a date-time value?
In the DateFormat class there are some predefined constants that we can use to format a date time value. Here is an example of it.
And you'll see the result as follow:
Today 12/2/07 8:17 AM
Today Dec 2, 2007 8:17:09 AM
Today December 2, 2007 8:17:09 AM ICT