oracle:
当前时间:sysdate
– dual (Oracle中的一张内部表,只有一行一列,一般用作特定查询)
时间转字符串: to_char(date,format)
select to_char...('2018-02-23 15:33:21','yyyy-mm-dd hh24:mi:ss') 字符串转时间 from dual;
2018-02-23 15:33:21
两个参数的格式必须匹配
mysql...代表小时,格式为(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)
sqlserver:
当前时间...:
select to_char(now(), 'yyyy-mm-dd hh24:mi:ss.us')
2019-04-06 17:17:09.177039
字符串转时间:
select to_date