Fixed datetime formay bug