mysql日期和字符相互转换方法
date_format(date,'%Y-%m-%d') -------------->oracle中的to_char();
str_to_date(date,'%Y-%m-%d') -------------->oracle中的to_date();
%Y:表明4位的年份
%y:表明2为的年份
%m:表明月, 格式为(01……12)
%c:表明月, 格式为(1……12)
%d:表明月份中的天数,格式为(00……31)
%e:表明月份中的天数, 格式为(0……31)
%H:表明小时,格式为(00……23)
%k:表明 小时,格式为(0……23)
%h: 表明小时,格式为(01……12)
%I: 表明小时,格式为(01……12)
%l :表明小时,格式为(1……12)
%i: 表明分钟, 格式为(00……59)
%r:表明 时间,格式为12 小时(hh:mm:ss [AP]M)
%T:表明 时间,格式为24 小时(hh:mm:ss)
%S:表明 秒,格式为(00……59)
%s:表明 秒,格式为(00……59)