Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and parsing turns a String into a Date.
1. In the MainActivity.java file, add the below line to the imports section.
import java.text.SimpleDateFormat;
SimpleDateFormat mySimpleDateFormat;
3. Compile and run!
Next Recommended Article: SimpleDateFormat() - How to Set a Pattern to SimpleDateFormat
Resources:
http://developer.android.com/reference/java/text/SimpleDateFormat.html