mercredi 5 décembre 2018

The best way to find the data in rails times only, without dates?

For example, I am having the data

<User id: 182, day: "2018-12-10", start_time: "2018-12-04 07:00:00", end_time: "2018-12-04 19:30:00", created_at: "2018-12-04 08:15:49", updated_at: "2018-12-04 09:41:38", mechanic_id: 1, end_day: "2018-12-07">

I want to run the query to fetch the data based on start_time

User.where(condition)

The condition must be time only it will not include the date.

Aucun commentaire:

Enregistrer un commentaire