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)