I'm using some custom fields in WordPress and I have a custom field called date-of-event
which can be used as a date picker from the back-end which is ideal for my client.
Client selects the date in the back-end:
I get the value using:
$date = <?php get_post_meta(get_the_ID(), 'wpcf-date-of-event', true); ?>
However, the date is returned as a single line.
1455100200
How can I convert this single line of data into a readable date and time?
I've looked up http://php.net/manual/en/datetime.createfromformat.php but I'm not too sure what format is being returned in the first place?