Java Reference
In-Depth Information
Long date and time format ( "%ta %tb %td %tT %tZ %tY" )
c
So the previous examples could be combined in the more compact and
somewhat more readable
System.out.printf("%1$tT %1$tD %n", new Date());
As with all format conversions a width can be specified before the con-
version indicator, to specify the minimum number of characters to out-
put. If the converted value is smaller than the width then the output is
padded with spaces. The only format flag that can be specified with the
date/time conversions is the '' flag for left-justificationif this flag is given
then a width must be supplied as well.
 
Search WWH ::




Custom Search