fix lowercase DATETIME to work correctly with casting