# Adate expected, got String

**URL:** <https://www.ruby-forum.com/t/adate-expected-got-string/104332>\
**Category:** Rails\
**Created:** [May 16, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/adate-expected-got-string/104332 "2007-05-16T21:23:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_Bao](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@Steven\_Bao](https://www.ruby-forum.com/u/Steven_Bao)\
**Post date:** [May 16, 2007, 9:23pm UTC](https://www.ruby-forum.com/t/adate-expected-got-string/104332/1 "2007-05-16T21:23:04Z")

</div>

Hello,  
I have the models “announcement” and “adate” where “announcement”  
belongs\_to :adate and adate :has\_many announcements. When I try  
submitting a form using the name announcement[adate] it des not work -  
gives me Adate expected, got String. What is the problem?

My database schema is table announcements has the columns id, text, and  
adate.

Thank you!

---

<div class="post-metadata">

**Author:** ![Steven\_Bao](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@Steven\_Bao](https://www.ruby-forum.com/u/Steven_Bao)\
**Post date:** [May 17, 2007, 1:58am UTC](https://www.ruby-forum.com/t/adate-expected-got-string/104332/2 "2007-05-17T01:58:38Z")

</div>

Steven,

A general description of a problem is not enough for us to solve it.

You should post the code, what you think it should do, what it  
actually does, and the complete error message including an indication  
of which line caused the error.

Pete Y.

> **[Pete Yandell — Principal Engineer / Architect](https://notahat.com/)**
>
> Pete Yandell is an experienced Principal Software Engineer and Architect based in Melbourne, Australia.
