- This topic has 0 replies, 1 voice, and was last updated 2 years ago by .
I have a CPT field called fish_datefirstsighted. It is a date field. When I display this using
<?php $value = rwmb_get_value( 'recapture_dateofsighting' ); echo $value; ?>
I get: '2019-5-7' which represents 7th day of May 2019.
When I format as follows, I get 1 January, 1970.
<?php $value = rwmb_get_value( 'recapture_dateofsighting' ); echo date( 'j F, Y', $value ); ?>
I know this result means there is a date translation error but I don't know how to resolve this.
Can anyone offer a suggestion?
- You must be logged in to reply to this topic.