SQL語法
時(shí)間格式化:
CONVERT(varchar(100), sysDate, 120) as start_date
時(shí)間加減減法:
CONVERT(varchar(100), DATEADD(mi, -10, GETDATE()), 120)
Oracle語法
時(shí)間格式化:
to_char(sysDate,'yyyy-MM-dd HH24:mi:ss')as start_time
時(shí)間加減語法:
trunc(X."DATE",'DD')-TRUNC(X."DATE1",'DD')+1 as DAYS, 得出天數(shù)