Fix encdate