On Friday, February 1, 2013 4:58:28 AM UTC-6, 吴玉宏 wrote:

> posted_at.cast(Date) works perfectly ,:-)
>

More DRY and flexible:

1.9.3p362 :001 > DB[:transactions].select_group{convert(varchar(10), 
posted_at, 120).as(:post_date)}
 => #<Sequel::Mock::Dataset: "SELECT convert(varchar(10), posted_at, 120) 
AS post_date FROM transactions GROUP BY convert(varchar(10), posted_at, 
120)"> 
1.9.3p362 :002 >  

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to