fixing TYPE_DATE
same for TYPE_TIME