I want to display $row->depositdate in dd-mm-yyyy format.
If the date column in database is null the date displayed is : 01-01-1970
NULL is interpreted as 0 by strtotime, since it want to be passed an integer timestamp. A timestamp of 0 means 1-1-1970.
So you'll have to check for yourself if $row->depositdate === NULL, and if so, don't call strtotime at all.
$row->depositdate === NULL