My suggestion is to
never write the query like that (day='01.01.2017').
Always be at the safe side writing the code like this :
select * from my_tab t
where t.day = to_date('2017-12-23','YYYY-MM-DD') or to_date('01.02.2017', 'DD.MM.YYYY')
or whatever format you prefer.
If however I cannot convince you
, you can run the following
SELECT *
FROM nls_database_parameters a
WHERE a.PARAMETER = 'NLS_DATE_FORMAT';
and then use the format returned at "where t.day = ..."