Convert datetime string to timestamp