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/2dfa21b7-3f22-4bc0-925b-21a9d63d89ccn%40googlegroups.com.

Reply via email to