0

Error when using DateFormat and SimpleDateFormat

I am getting an error when using DateFormat and SimpleDateFormat:

[Sourced file: : Typed variable declaration : Class: SimpleDateFormat not found in namespace]

Code:

import java.util.*;
// Variables for reportQtr and year
SimpleDateFormat dtFmt = new SimpleDateFormat("MM/dd/yyyy"); // DateFormat dtFmt = new SimpleDateFormat("MM/dd/yyyy");
Calendar cal = Calendar.getInstance();
String date = dtFmt.format(cal.getTime());


I do not understand how this is not included in the java.util.* (calendar)

1 comment

Post is closed for comments.