Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert string to mysql datetime in java

807580Oct 13 2009 — edited Oct 13 2009
Hi,

Can somebody suggest me how to convert a date string in this format - Mon Aug 10 16:36:00 CDT 2009 to a MySql DateTime in Java?
This date is the result of Apache POI. Below is my code:
if(HSSFDateUtil.isCellDateFormatted(hssfCell)) {
cellData = HSSFDateUtil.getJavaDate(hssfCell.getNumericCellValue()).toString();
break;
}

I want to insert cellData into MySql DateTime field.

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2009
Added on Oct 13 2009
1 comment
1,178 views