I have a table that contains starts_at:datetime and ends_at:datetime.
In the index view, I would like to display the hours between the two datetime fields.
How would I do that?
Thanks in advance!!!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends on the format you expect. You can use
distance_of_time_in_wordsfor exampleIf you need the number of hours between the 2 dates: