Informix 中的 CURRENT 和 TODAY 有什么区别

What is the difference between CURRENT and TODAY in Informix

我是 informix 的大三学生,我正在为一些日期计算而苦苦挣扎。我的源代码中有这个代码片段:

LET dtRefDate = TODAY;

IF extend( CURRENT, hour to hour ) BETWEEN '06' AND '23'  THEN LET
   dtRefDate = TODAY+1;
END IF;

谁能解释一下扩展函数的作用是什么? CURRENT 和 TODAY 有什么区别?我没有理解与 IBM 官方文档的区别。 谢谢

TODAY returns DATE 值,CURRENT returns DATETIME(YEAR TO FRACTION (3))值。

EXTEND 用于提取 DATE 或 DATETIME 值的各个部分。

看这个例子:

> select CURRENT from table(set{1});
(expression)
2019-09-29 10:07:12.000
1 row(s) retrieved.

> select TODAY from table(set{1});
(expression)
09/29/2019
1 row(s) retrieved.

> select extend(TODAY,year to year) from table(set{1});
(expression)
2019
1 row(s) retrieved.

> select extend(TODAY,month to day) from table(set{1});
(expression)
09-29
1 row(s) retrieved.

> select extend(CURRENT,hour to minute) from table(set{1});
(expression)
10:08
1 row(s) retrieved.

>