How to format a date using Apache Derby?

Look here: DateFormat and SimpleDateFormat Examples Sample code: public static void main(String args) { // Get the Date object that comes from DerbyDB... //Date derbyDate = YOUR DATE FIELD HERE // Make a SimpleDateFormat for toString()'s output. This // has short (text) date, a space, short (text) month, a space, // 2-digit date, a space, hour (0-23), minute, second, a space, // short timezone, a final space, and a long year. SimpleDateFormat format = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy"); // See if we can parse the output of Date.toString() try { Date parsed = format.

Parse(derbyDate.toString()); System.out. Println(parsed.toString()); } catch(ParseException pe) { System.out. Println("ERROR: Cannot parse \"" + derbyDate.toString() + "\""); } }.

This. It also goes without saying that you (the OP) do not use Apache Derby (or any relational database system) to format the date. You use a formatter.

You use Derby to pull the data with SQL, and you use a formatter to massage the date data and make it pretty. – luis. Espinal Apr 3 '10 at 22:55 @luis.

Espinal: really good explanation Luis... :) – Leniel Macaferi Apr 3 '10 at 23:05.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions