# Find by datetime

**URL:** <https://www.ruby-forum.com/t/find-by-datetime/137811>\
**Category:** Rails\
**Created:** [May 16, 2008, 3:55pm UTC](https://www.ruby-forum.com/t/find-by-datetime/137811 "2008-05-16T15:55:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [May 16, 2008, 3:55pm UTC](https://www.ruby-forum.com/t/find-by-datetime/137811/1 "2008-05-16T15:55:00Z")

</div>

If I have a string 2008-05-16 15:27:30 then how do I find by datetime  
(created\_at)?

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [May 16, 2008, 4:14pm UTC](https://www.ruby-forum.com/t/find-by-datetime/137811/2 "2008-05-16T16:14:04Z")

</div>

I used the ActiveRecord Extensions plugin in order to make this easier.  
Check it out a tutorial here:  
[http://www.rubyinside.com/advent2006/17-extendingar.html](http://www.rubyinside.com/advent2006/17-extendingar.html)

On Fri, May 16, 2008 at 9:55 AM, PÃ¥l BergstrÃ¶m \<

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [May 16, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/find-by-datetime/137811/3 "2008-05-16T16:35:16Z")

</div>

Nick Quaranto wrote:

> I used the ActiveRecord Extensions plugin in order to make this easier.  
> Check it out a tutorial here:  
> [Extending ActiveRecord](http://www.rubyinside.com/advent2006/17-extendingar.html)
> 
> On Fri, May 16, 2008 at 9:55 AM, PÃ¥l BergstrÃ¶m \<

Thanks. But if I don’t use a plugin? I would like to understand it  
myself.
