This example shows how to format week days using Format class. In this program we use a pattern of special characters to format week day.
Week Days Format Example
This example shows how to format week days using Format class. In this program we use a pattern of special characters to format week day.Description of the code :
SimpleDateFormat() : SimpleDateFormat class use for formatting and parsing dates. It allows for formatting date into text , parsing text into date and normalization.
format() : This method used for format Date class object into date / time and appends the it into the StringBuffer.
SecondFormat.java
|
Output
Day : Sat
|
Download code