import java.util.*;
import javax.swing.*;
import java.text.*;
class Date
{
public static void main (String[] args)
{
Date today;
SimpleDateFormat simpleDF1,simpleDF2;
today = new Date();
simpleDF1 = new SimpleDateFormat( );
simpleDF2 = new SimpleDateFormat("EEEE MMMM dd,yyyy");
JOptionPane.showMessageDialog (null,"Today is "+simpleDF1.format(today));
JOptionPane.showMessageDialog (null,"Today is "+simpleDF2.format(today));
}
}
y it say tat cannot format given Object as a date at java.text.DateFormat???
how to solve it?? thx


Ask A New Question
Reply





MultiQuote







|