J
Josselin
I am lost....
using
sel_start_date = DateTime.new(sd.year,sd.month,sd.day,16,0,0)
if I display it I have sel_start_date.to_s => "2006-10-19T16:00:00Z"
but I cannot performed correct searches into my MySQL DB (4.1.23) on
datetime columns
It seems that I need to use strings like "2006-10-19 16:00:00" in the
WHERE clause...
( I tried using manual queries with this format and it runs...)
what is the best startegy to use datetime correctly between Ruby and MySQL ?
thanks
Kad
using
sel_start_date = DateTime.new(sd.year,sd.month,sd.day,16,0,0)
if I display it I have sel_start_date.to_s => "2006-10-19T16:00:00Z"
but I cannot performed correct searches into my MySQL DB (4.1.23) on
datetime columns
It seems that I need to use strings like "2006-10-19 16:00:00" in the
WHERE clause...
( I tried using manual queries with this format and it runs...)
what is the best startegy to use datetime correctly between Ruby and MySQL ?
thanks
Kad