To just get the post date, you can replace that entire section of code with just the get_the_date() function.
To display the article’s date, use this code:
<?php echo get_the_date(); ?>
Check out the date format options on the codex page linked above to customize it to your liking, if necessary.