Jeremy, I had tried that earlier. My output comes out like this -

--- 
- :count: 5
  :"CAST(strftime('%Y', `start`) AS INTEGER)": 

Have the DateTimes not got inserted correctly into the table in my case?

 - Abhijit.

On Tuesday, 11 September 2012 02:27:35 UTC+5:30, Jeremy Evans wrote:
>
> On Monday, September 10, 2012 1:42:04 PM UTC-7, abhijit wrote:
>>
>> Jeremy, I did what you suggested. My query now looks like this -
>>
>> puts 
>> db[:timesheets].select_group(:start).select_append{count(:start)}.all.to_yaml
>>
>> I need to extract and group based on the year on the DateTime Column 
>> (:start). Will be grateful for any help.
>>
>
>    db[:timesheets].group_and_count(Sequel.extract(:year, 
> :start)).all.to_yaml
>
> Jeremy
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sequel-talk/-/cn3G5fk41dYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to