AND EXPERTS I'VE DATA WITH 24-SEP-07 FOR MORE THAN 10 RECORDS, AND
I'VE MINOR DOUBT BASED ON STRUCTURE OF A TABLE I MEANT THE TYPE OF
CREATED_AT COLUMN, LIKE WHEN I DO MIGRATE I MADE CREATED_AT as
datetime, but oracle supports date type, is there any difference?
I would definitely keep it datetime. Read up about oracle date column. There are some funnies involved. I have never used oracle so not clued up.
The issue here I believe is that the created_at field is datetime which contains date elements and time elements. the "23-Sept-07’ string doesn’t compare well. When you call .to_time in converts that string into a datetime object. This can then be nicely compared with the datetime field. I would rather change the way I do the query by always passing a datetime than change the database and work with strings.