# Created\_at Column and strftime

**URL:** <https://www.ruby-forum.com/t/created-at-column-and-strftime/112176>\
**Category:** Rails\
**Created:** [August 16, 2007, 2:35am UTC](https://www.ruby-forum.com/t/created-at-column-and-strftime/112176 "2007-08-16T02:35:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [August 16, 2007, 2:35am UTC](https://www.ruby-forum.com/t/created-at-column-and-strftime/112176/1 "2007-08-16T02:35:23Z")

</div>

I am trying to format the created\_at value of an object for display in  
the view.

Just for testing purposes, right now I’m doing -  
puts @the\_object.created\_at.strftime(’%B %e, %G’)  
puts @the\_object.created\_at.to\_date.strftime(’%B %e, %G’)

The first line doesn’t output anything, while the second one outputs the  
date in the correct format. Why do I have to convert it to a Date object  
first? Doesn’t Time have a strftime method?

Thanks!
