Creation Dates Node / View

On the node view I have this code and it works – it shows me how long ago the article was posted.

$formatted_date = format_date($node->created, ‘custom’, ‘Y-m-d h:i:s’);

$strStart = $formatted_date;
$strEnd = date(“Y-m-d h:i:s”);

$dteStart = new DateTime($strStart);
$dteEnd = new DateTime($strEnd);

$interval = $dteStart->diff($dteEnd);

However, on the view that goes to it (which lists more than 1 node) it doesn’t work
$formatted_date = format_date($fields[‘created’]->content, ‘custom’, ‘Y-m-d h:i:s’);

I know it’s something to do with the $fields[‘created’]->content format v node->created but I don’t know what the difference is between them and why node->created works but fields[‘created’]->content doesn’t.

Drupal version: