This example shows how to parsing date using Format class. In this program we use a pattern of special characters to time format.
Parsing Date Example
This example shows how to parsing date using Format class. In this program we use a pattern of special characters to time format.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 is used for format Date class object into date / time and appends the it into the StringBuffer.
ParsingDate.java
01/29/08
01/01/08
29-Jan-08
|
Output:
01/29/08 01/01/08 29-Jan-08 |
Download code