How to Declare a SimpleDateFormat variable

SimpleDateFormat was added in API Level 1
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; 

2. Add the below line to the onCreate method.

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