[WORDPRESS] How to get and display article update date

Code

single.php

<?php if ( get_the_date() < get_the_modified_date() ) : ?>
<time datetime="<?php get_the_modified_date('Y-m-d'); ?>">
<?php the_modified_date('Y-m-d'); ?>
</time>
<?php endif; ?>

Related article