You will need to use strtotime()
with Date()
to make your own date format
If you already know the meta key that you need you can do the following
$post_meta_data = get_post_meta(get_the_ID(), 'endDate', true);
See get_post_meta for more information about the function.
Now that we have the value and going your format all you need to do is the following
$new_format = Date('d-m-Y', strtotime($post_meta_data));
EDIT
echoing the new format.
I removed the (
)
because they are not needed for echoing string;
echo 'Submission deadline: ' . $new_format;
The whole code combined
<span class="closes-from">
<?php
// get end date (maybe change $post_meta_data to a more appropriate name)
$post_meta_data = get_post_meta(get_the_ID(), 'endDate', true);
// create a new date format
$new_format = Date('d-m-Y', strtotime($post_meta_data));
// output the new date format with some text
echo 'Submission deadline: ' . $new_format;
?>
</span>