Update SQL for timestamps