`
rockjava
  • 浏览: 90988 次
  • 性别: Icon_minigender_1
  • 来自: 旮旯
社区版块
存档分类
最新评论

informix 数据库 时间、日期简单操作

阅读更多

today  当前日期 (date)

sysdate 、current 当前时间(datetime)

 

select sysdate from test_table;-- 系统当前时间

select current from test_table;-- 系统当前时间

select TODAY-1 from test_table;-- 系统前一天日期

select sysdate - 1 UNITS year from test_table;-- 系统前一年时间

select sysdate - 1 UNITS month from test_table;-- 系统前一月时间

select sysdate - 1 UNITS day from test_table;-- 系统前一天时间

select sysdate - 1 UNITS hour from test_table;-- 系统前一小时时间

select sysdate - 1 UNITS minute from test_table;-- 系统前一分钟时间

select sysdate - 1 UNITS second from test_table;-- 系统前一秒时间

select date (sysdate - 1*interval(24) hour to hour) from test_table;-- 系统前一天时间
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics