fix _formatDatetime() issue when dateTime is string