Mykhaylo Adamovych
Mykhaylo Adamovych

Reputation: 20966

get start of the day in sql

I used to use trunc(sysdate) to get start of the day and trunc(sysdate + 1) to get end of the day in Oracle.
But for tests we use H2 DB and this doesn't work.

Are there any lovely alternatives to get start of the day?

Upvotes: 0

Views: 1176

Answers (2)

Mykhaylo Adamovych
Mykhaylo Adamovych

Reputation: 20966

There is an possibility to add user-defined functions.

Upvotes: 0

mucio
mucio

Reputation: 7119

Try to use CURRENT_DATE in h2.

Upvotes: 2

Related Questions