select substr(ts,0,7) from md_class ;--2018-04 select substr(ts,0) from md_class ;--2018-04-06 14:30:11 select substr(ts,1) from md_class ;--2018-04-06 14:30:11 select substr(ts,2) from md_class ;--018-04-06 14:30:11 select substr(ts,3) from md_class ;--18-04-06 14:30:11