Convert value to long