N
New
Hello.
I am trying to reproduce the same results so I can prove to myself I
understand what is happening:
This prints a time in hh:mm:ss PM/AM
Date now = new Date();
out.println("DEBUG: " + DateFormat.getTimeInstance().format(now));
I am trying to expand the above to make sure I understand it:
I keep getting errors (I'm using JSP so the errors are hard to read)
so I don't think it's correct:
Date now = new Date();
DateFormat df1 = new DateFormat();
df1.getTimeInstance();
DateFormat df2 = new DateFormat();
String str = new String("");
str = df2.format(now);
out.println("DEBUG: " + str);
Where did I go wrong?
Thank you, New
I am trying to reproduce the same results so I can prove to myself I
understand what is happening:
This prints a time in hh:mm:ss PM/AM
Date now = new Date();
out.println("DEBUG: " + DateFormat.getTimeInstance().format(now));
I am trying to expand the above to make sure I understand it:
I keep getting errors (I'm using JSP so the errors are hard to read)
so I don't think it's correct:
Date now = new Date();
DateFormat df1 = new DateFormat();
df1.getTimeInstance();
DateFormat df2 = new DateFormat();
String str = new String("");
str = df2.format(now);
out.println("DEBUG: " + str);
Where did I go wrong?
Thank you, New