Thank you Robin for your reply
My question how to display the result of the query on CMSB ListPage Fields and what should the field type
I tried using separator field as below code
<?php
$date1 = new DateTime(@$RECORD['createdDate']);
$date2 = new DateTime(date("Y-m-d H:i:s"));
$interval = $date1->diff($date2);
$days=$interval->days;
?>
<input type="text" style="width: 100%" name="lock_period" value="<?php echo $days;?>" readonly class="text-input form-control" data-dirrty-initial-value="">
its return the value in edit page as expected but didn't displayed on in the list page
Please find attached screen shot for more clarification