oracle
日期-字符穿 to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') sysdate爲系統當前時間
字符串-日期 to_date('2010-11-11 11:11:00',yyyy-mm-dd hh24:mi:ss')
mysql
日期轉字符串 date_format(now(),'y%-m%-d% h%:i%:s%') now() 爲系統當前時間
字符串轉日期 str_to_date(2010-11-11 11:11:00','y%-m%-d% h%:i%:s%')