Hi, Possible Raw SQL would be:
lpad(extract(month from now())::text, 2, '0') Is it possible to accomplish this query in Sequel? On Monday, August 17, 2020 at 12:41:09 AM UTC+3 denniso...@gmail.com wrote: > Hi, > > I want to extract month from date but it extracts: > > 2020-07 (July 2020) > > as: > > 2020-7 (Without zero padded). > > My code: > > Sequel.as(concat(created_on.extract(:year), '-', > *created_on.extract(:month)*, 'date_year_month') > > This code give me "2020-7" instead of "2020-07". > > How can I use *lpad *here or any idea? > > Dennis. > > -- 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 sequel-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/c05e993d-9abd-4c07-b061-2f09d81bd89bn%40googlegroups.com.