deprecated date problem...

** cross posted on SDN JSC Forum and Netbeans J2EE Nabble forum **

I'm trying to automatically create a 7 row table that's bound to a database with the first column of type DATE (MySQL.) The dates are static text fields that I populate with the dates of a given week and are saved to the database upon commit. The problem is that I compute the dates using Calendar objects and the only format that saves back into MySQL DATE fields (that I can find) is YYY-MM-DD, I'd like the column to display asMonth dd, yyy (i.e May 2, 2007) but if I seed the column with the latter format it won't convert and commit succesfully. If I use the YYYY-MM-DD format it will commit and upon refresh will show up asMonth dd, yyyy! a java.util.Date object will convert naturally in that space -i.e. I can just setthe column value to the date object and it will display, commit and redisplay asMonth dd, yyyy but Date objects are deprecated and I can't adjust them accordingly. (see thread: http://forum.java.sun.com/thread.jspa?forumID=881&threadID=5049871) What are my options here?

Thanx in adv

[1130 byte] By [jakeochsa] at [2007-11-27 3:08:57]
# 1

Hello there!

I don't understand very well what u want to do, but, i've worked with (and searched a lot of ways to use) dates in Creator with mysql, and if im right u want to display a date with specific format in the table linked to database in mysql, it is quite simple, just look into palette in creator in converters box a function called DateTime Converter, drag over the colum wich is date and is StaticText too, and in properties box choose a format u want to display, if im wrong just post again, and maybe i can help u!

Belthazor

Beltazora at 2007-7-12 3:57:29 > top of Java-index,Development Tools,Java Tools...
# 2
it appears that Date Time converter only works with Date objects. I'd love for it to work with Calendar objects s that I could set a colum's data to a calendar object and have it commit to a MySQL column of type DATE. Can this be done?
jakeochsa at 2007-7-12 3:57:29 > top of Java-index,Development Tools,Java Tools...