We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Pages: 1 2 
MySQL library (Read 6407 times)
Re: MySQL library
Reply #15 - Jun 2nd, 2005, 12:35am
 
as the reference says you'll get a java.sql.Timestamp from getTimestamp("date"). this equals the TIMESTAMP type in mysql ...

to get a string in format "yyyy-mm-dd hh:mm:ss.fffffffff" try toString() on the result of getTimestamp("date") like:

Code:

String tstamp = msql.getTimestamp("date_column").toString();


( this is untested ... let me know if it works )
F
Re: MySQL library
Reply #16 - Jun 2nd, 2005, 1:28am
 
Ah, I see. I wasnt aware of the toString() casting method. I was attempting

String date = mysql.getTimestamp("date");. Your solution works as advertised. Thanks very much.
Pages: 1 2