# Datetime to\_s(:option) not working

**URL:** <https://www.ruby-forum.com/t/datetime-to-s-option-not-working/168038>\
**Category:** Rails\
**Created:** [May 15, 2009, 7:25am UTC](https://www.ruby-forum.com/t/datetime-to-s-option-not-working/168038 "2009-05-15T07:25:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 15, 2009, 7:25am UTC](https://www.ruby-forum.com/t/datetime-to-s-option-not-working/168038/1 "2009-05-15T07:25:54Z")

</div>

I added a migration to add a datetime object column to my database. It  
all works great, and I can edit it and everything using the  
select\_date helper for forms.

BUT when I try to format the date using gallery.gallery\_date.to\_s  
(:short) I get an error:

“wrong number of arguments (1 for 0)”

How do I do this?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [May 15, 2009, 10:11am UTC](https://www.ruby-forum.com/t/datetime-to-s-option-not-working/168038/2 "2009-05-15T10:11:47Z")

</div>

Shouldn’t it be  
gallery\_date.to\_formatted\_s(:short)  
?

On May 15, 12:24 pm, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
