Hey guys
I am using tomcat 5.5, J2SE 1.5 with Oracle 8i
Here is a function I have that converts a date like (18-06-2006) to (18-JUN-2006).
<%! public String changeDateFormat(String str) throws java.text.ParseException {
SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
java.util.Date tDate = new java.util.Date();
tDate = df.parse(str);
df = new SimpleDateFormat("dd-MMM-yyyy");
String date1 = df.format(tDate).toUpperCase();
return date1;
}
%>
What I want to be able to do is convert a date like (9999-12-30) to (30-DEC-9999). What Modifications do I need to make to this function to be able to do this. Because curently if I pass (9999-12-30) as a parameter, it gives an error saying "unparseable date".
Any help would be highly appreciated.
Thanks
I am using tomcat 5.5, J2SE 1.5 with Oracle 8i
Here is a function I have that converts a date like (18-06-2006) to (18-JUN-2006).
<%! public String changeDateFormat(String str) throws java.text.ParseException {
SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
java.util.Date tDate = new java.util.Date();
tDate = df.parse(str);
df = new SimpleDateFormat("dd-MMM-yyyy");
String date1 = df.format(tDate).toUpperCase();
return date1;
}
%>
What I want to be able to do is convert a date like (9999-12-30) to (30-DEC-9999). What Modifications do I need to make to this function to be able to do this. Because curently if I pass (9999-12-30) as a parameter, it gives an error saying "unparseable date".
Any help would be highly appreciated.
Thanks