Date Time

I am having trouble displaying the current date and time.

Abed wrote:

I am having trouble displaying the current date and time.

$ ruby script/console
Loading development environment.

now = Time.now
=> Thu Oct 05 13:36:59 -0700 2006

now.to_s
=> “Thu Oct 05 13:36:59 -0700 2006”

now.to_s(:db)
=> “2006-10-05 13:36:59”

today = Date.today
=> #<Date: 4908027/2,0,2299161>

today.day
=> 5

today.month
=> 10

Abed wrote:

I am having trouble displaying the current date and time.

<%= h Time.now.strftime(’%B %d, %Y’) %>

Daniel Collis-puro wrote:

Abed wrote:

I am having trouble displaying the current date and time.

<%= h Time.now.strftime(’%B %d, %Y’) %>

thanks