gajen007 0 Newbie Poster

Gentlemen, I have a problem in entering a "DATE" in to MySQL table via a Java SWING interface. I used 'jdatepicker' to select a date & I use XAMPP server for MySQL database.

Earlier I converted the selected date in to String values & feed as VARCHAR in mysql table. Such the String was..."1/17/2014 14:49"

Later, I assumed there will be a calculation based on DATE, (Let's assume 'Age') & I modify the mysql datatype as "DATETIME". Now that String has to be converted as... 2014-17-01 14:00:00 This might be a DATETIME value.

Are there any possibilities to do it..?

Thanks in advance..!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.