日期格式化为某年某月某日


cast(extract(year,cast (?d_begin?,DATE )),VARCHAR(4)) + '年' + 
cast(extract(month,cast (?d_begin?,DATE )),VARCHAR(2)) + '月' + 
cast(extract(day,cast (?d_begin?,DATE )),VARCHAR(2)) + '日'  +
'至'+
cast(extract(year,cast (?d_end?,DATE )),VARCHAR(4)) + '年' + 
cast(extract(month,cast (?d_end?,DATE )),VARCHAR(2)) + '月' + 
cast(extract(day,cast (?d_end?,DATE )),VARCHAR(2)) + '日'

你可能感兴趣的:(sql)