Hi all,
I am using Oracle and H2 1.4.200 for in memory tests. In a query we are using TO_DATE with an implicit default 'yyyy-MM-dd' and I would like this to keep it this way on H2 as well.
I have tried this :
drop ALIAS if exists TO_DATE;
CREATE ALIAS TO_DATE as '
import java.text.*;
@CODE
java.util.Date toDate(String s) throws Exception {
return new SimpleDateFormat("yyyy-MM-dd").parse(s);
}
'
But I get : 90076-200 Function "TO_DATE" already exists.
If I try to drop it without 'if exists' it says that it does not exist.
Any idea how to fix this or other option to change from H2 default DD MON YYYY to the another one ?
Tks,
Marius