Hi community,
I am facing this issue, but I am not sure if this is right or did I miss to set something.
I am just simply performing a date subtraction without specifying the type (day, hour, minute), and I got the following (I executed on 2020-05-04):
v11.5 - db2 supposes it is a day
[db2inst1@db2v115 ~]$ db2 "values current date - 1"
1
----------
05/03/2020
1 record(s) selected.
[db2inst1@dbv115 ~]$ db2 "values current timestamp - 1"
1
--------------------------
2020-05-03-12.07.01.750541
1 record(s) selected.
v10.5 - it throws an error
[db2inst1@db2v105 ~]$ db2 "values current date - 1 "
SQL0182N An expression with a datetime value or a labeled duration is not
valid. SQLSTATE=42816
[db2inst1@db2v105 ~]$ db2 "values current timestamp - 1"
SQL0182N An expression with a datetime value or a labeled duration is not
valid. SQLSTATE=42816
------------------------------
Andres Gomez Casanova
IBM Champion 2015-2020
DBA senior
Experian
Bogota
------------------------------
#Db2