How can I get node creation date?
Code for getting node created date.

$date = $variables['node']-&gt;getCreatedTime();
  // Here you can use drupal's format_date() function, or some custom PHP date formatting.
  $variables['date'] = \Drupal::service('date.formatter')-&gt;format($date, '$format');// enter date format in $format.