Formatting Time and Date is done using conversion specifier
%t . %t requires a suffix to describe the portion and precise format of the time or date desired. The argument corresponding to the %t must be of the type Calendar , Date , Long , orlong .
The following table gives us the description of the suffixes of
%t :
%t :
Time and Date Formatter CODE import java.util.*; OUTPUT Mon Jan 13 01:27:38 PST 2014 DESCRIPTION Note that the output of this program changes according to the date and time of the compilation. This is because we have used THINGS TO TRY
Dependent Topics :
|