code/ViewableWrapper.php
public function AsDate($field)
    {
        $d = $this->$field;
        return DBField::create('Date', is_numeric($d) ? date('Y-m-d H:i:s', $d) : $d);
    }
public function AsDate($field)
    {
        $d = $this->$field;
        return DBField::create('Date', is_numeric($d) ? date('Y-m-d H:i:s', $d) : $d);
    }
returns the given field as a casted date object