Empty Date Returned on my function

Replace the_date() with the_time() and it should work fine.

the_date() only displays the date for posts that are on different days. If two posts are published on the same day, only the first one’s date will be displayed.

tech