Convert JAXB XMLGregorianCalendar to java.sql.Date
Do you know of a way to convert
--- to ---
I'm parsing (unmarshalling) an xml doc using JAXB api, and I need to
save the date i'm getting from xml into the database.
Does anyone know of a possible way of doing this.
Thanks in advance.
I know you must have been set with the issue by now. Just posting it here for anyone having the same question:
XMLGregorianCalendar xcal = <assume this is initialized>;
java.util.Date dt = xcal.toGregorianCalendar().getTime();
To get a SQL version Date:
java.sql.Date sqlDt = new java.sql.Date(dt.getTime());
|All times are GMT. The time now is 06:36 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.