Hi Tim I don't have access to my code at the moment but here is the situation. I have a simple counter on a web page that updates a customer record 0n every visit. I can use the mysql built in timestamp however I have another script that runs daily at midnight which of course updates the timestamp on all records. So I need to add a datetime string to my update with a date that mysql understands. I'm new to Ruby scripting so time and datetime are a bit daunting. Thanks, Peter On Wed, 2007-28-02 at 23:31 +0900, Tim Becker wrote: > > I'm missing the boat on datetime. I'm trying to convert Ruby datetime to > > be compatible with mysql. I'm not getting any errors but the results > > always end up 0000-00-00-0000 > > I don't believe you should need to do any conversion, Ruby's date types > should work as parameters to prepared statements and date fields > returned by selects shouldn't need conversions, either. How are you > connecting to mysql, and what problems are you having? It would help > if you posted an example. > > -Tim > >