Search code examples
databasedatehsqldb

Database Hsqldb cannot differentiate between date and timestamp


enter image description here

i have been using postgresql to cast current date as date and the result is like2016-08-08 but when i tried it on hsqldb the result is shown like above can someone enlighten me about this ? i want to get only the date not the time on hsqldb thanks


Solution

  • You have probably set the Oracle syntax compatibility mode. In the default mode and also in PostgreSQL syntax mode, the result looks like PostgreSQL:

    C1                         C2                         C3         
    -------------------------- -------------------------- ---------- 
    2016-08-09 20:57:24.043000 2016-08-09 20:57:24.043000 2016-08-09