Fix Date and DateTime conversion