First of all - you are getting - or using - incorrect string representation of timestamp:
"2024-11-25-24.00.00.000000."
-------------------------------------^
This decimal point (dot) is wrong here:
db2inst1@ThinkPad-T410:~$ db2 "insert into t values ('2024-11-25-24.00.00.000000.')"
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0180N The syntax of the string representation of a datetime value is
incorrect. SQLSTATE=22007
I used Db2 CLP for your data:
db2inst1@ThinkPad-T410:~$ db2 describe table t
Data type Column
Column name schema Data type name Length Scale Nulls
------------------------------- --------- ------------------- ---------- ----- ------
C SYSIBM TIMESTAMP 10 6 Yes
1 record(s) selected.
db2inst1@ThinkPad-T410:~$ db2 "insert into t values ('2024-11-26-00.00.00.000000')"
DB20000I The SQL command completed successfully.
db2inst1@ThinkPad-T410:~$ db2 "insert into t values ('2024-11-25-24.00.00.000000')"
DB20000I The SQL command completed successfully.
db2inst1@ThinkPad-T410:~$ db2 "select * from t"
C
--------------------------
2024-11-26-00.00.00.000000
2024-11-25-24.00.00.000000
2 record(s) selected.
db2inst1@ThinkPad-T410:~$
Both values are correct; there is a note wrt to using 24 as hour:
A time is a three-part value (hour, minute, and second) designating a time of day under a 24-hour clock:
- The range of the hour part is 0 - 24.
- The range of the minute and second parts is 0 - 59.
If the hour is 24, the minute and second specifications are 0.
Important: Using the value 24 when representing hours in a time value might result in errors or unexpected data. To avoid this issue, use 00 instead of 24.