to_char()函数是将datetime类型转换成string类型
to_date()函数是将string类型转换成datetime类型select to_char(t.sj,'YYYYMMDD') from tt t