can't cast [{ts '2018-07-20 13:04:51'} 00:00:00] to date value