Hi Ross
I've always used (Simple)DateFormat.parse to convert the string to a Date object. You should then be
able to create an instance of an SQLDate by going something like:
String dateText = // the string you have to parse.
Date parsedDate = SimpleDateFormat.parse(dateText, 0);
SQLDate sqlD = new SQLDate(parsedDate.getTime());
Alan
On 2/4/2011 9:14 AM, Ross McKinnon wrote:
Hi,
Does anyone have a tried and tested method of converting a string date
(yyyy-mm-dd) into an SQL date to insert into a database. Every method
I find online doesnt seem to work.
Thanks,
Ross
--
Alan Chaney
CTO and Founder, Mechnicality, Inc.
www.mechnicality.com
--
You received this message because you are subscribed to the Google Groups "Google
Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.