reformatted the timestamp with sql