E
E
eldar_web2016-03-04 19:23:29
MySQL
eldar_web, 2016-03-04 19:23:29

How to compare these types in Ruby on Rails in MySQL database?

There is such a type (record) in the database:
2016-03-04 14:14:11 UTC
And this 2016-01-01T00:00.
I want to compare these dates, but in what format does it output in order to compare later?
Table.where(???)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
@
@mgyk, 2016-03-05
_

Datetime can be converted to DB format datetime.to_s(:db)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question