# Date

**URL:** <https://www.ruby-forum.com/t/date/105489>\
**Category:** Rails\
**Created:** [May 30, 2007, 12:13pm UTC](https://www.ruby-forum.com/t/date/105489 "2007-05-30T12:13:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![madhan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/aca169/32.png) [@madhan](https://www.ruby-forum.com/u/madhan)\
**Post date:** [May 30, 2007, 12:13pm UTC](https://www.ruby-forum.com/t/date/105489/1 "2007-05-30T12:13:52Z")

</div>

hi all,  
i have used date\_select in my rhtml…  
when i read the parameters in the controller, it returns as an arrry  
like  
xxx(1i)=\>2007, xxx(2i)=\>2, xxx(3i)=\>7  
i want to find out the day of that particular date  
if there any posibility to get that one…

if anyone knows guide me…

---

<div class="post-metadata">

**Author:** ![madhan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/aca169/32.png) [@madhan](https://www.ruby-forum.com/u/madhan)\
**Post date:** [May 30, 2007, 1:51pm UTC](https://www.ruby-forum.com/t/date/105489/2 "2007-05-30T13:51:33Z")

</div>

Madhankumar Nagaraj wrote:

> hi all,  
> i have used date\_select in my rhtml…  
> when i read the parameters in the controller, it returns as an arrry  
> like  
> xxx(1i)=\>2007, xxx(2i)=\>2, xxx(3i)=\>7  
> i want to find out the day of that particular date  
> if there any posibility to get that one…
> 
> if anyone knows guide me…

Hi,

AR will parse automatically your hash and create a Date object. So, if  
you date belongs to Person.created\_on attribute for instance, you just  
need to do:

person = Person.new(params[:person])  
day\_you\_were\_looking\_for = person.created\_on.day.

Regards,  
Jean-Etienne

> **[Domain2.hu](https://domain2.hu/www.woa.hu)**
>
> www.woa.hu megvásárolható domain a kiemelt domain nevek piacterén.

---

<div class="post-metadata">

**Author:** ![madhan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/aca169/32.png) [@madhan](https://www.ruby-forum.com/u/madhan)\
**Post date:** [June 1, 2007, 9:13am UTC](https://www.ruby-forum.com/t/date/105489/3 "2007-06-01T09:13:17Z")

</div>

dear sir,  
i am very happy to inform u that, i got the result what i expected…  
just 1 month before only i started to learn ruby.  
thank u for ur kind help.

ur  
Madhan

Jean-Etienne D. wrote:

> Madhankumar Nagaraj wrote:
> 
> > hi all,  
> > i have used date\_select in my rhtml…  
> > when i read the parameters in the controller, it returns as an arrry  
> > like  
> > xxx(1i)=\>2007, xxx(2i)=\>2, xxx(3i)=\>7  
> > i want to find out the day of that particular date  
> > if there any posibility to get that one…
> > 
> > if anyone knows guide me…
> 
> Hi,
> 
> AR will parse automatically your hash and create a Date object. So, if  
> you date belongs to Person.created\_on attribute for instance, you just  
> need to do:
> 
> person = Person.new(params[:person])  
> day\_you\_were\_looking\_for = person.created\_on.day.
> 
> Regards,  
> Jean-Etienne  
> [http://www.woa.hu](http://www.woa.hu)
