What steps will reproduce the problem?
1.run this query at afternoon.
select trunc(current timestamp) ;
sql> select trunc(current timestamp);
TRUNC(CURRENT_TIMESTAMP())
2013-05-26 12:00:00.0
What is the expected output? What do you see instead?
should return '2013-05-26 00:00:00.0'.
Please use labels and text to provide additional information.
org.h2.expression.Function: around line 1018
case TRUNCATE: {
if (v0.getType() == Value.TIMESTAMP) {
java.sql.Timestamp d = v0.getTimestamp();
Calendar c = Calendar.getInstance();
c.setTime(d);
c.set(Calendar.HOUR, 0);
c.set(Calendar.MINUTE, 0);
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
It is only necessary to add 'c.set(Calendar.AM_PM, 0)'.
Original issue reported on code.google.com by litail...@gmail.com on 26 May 2013 at 1:36
Original issue reported on code.google.com by
litail...@gmail.com
on 26 May 2013 at 1:36